use std::error::Error;

use argh::FromArgs;

use crate::parsing::HostsFile;

/// Show the current hosts file
#[derive(FromArgs, PartialEq, Debug)]
#[argh(subcommand, name = "show")]
pub struct Args {}

pub fn main(_: &Args) -> Result<(), Box<dyn Error>> {
    let hosts_file = HostsFile::load();
    hosts_file.print();

    Ok(())
}
