use clap::{Arg, ArgMatches, Command}; use crate::commands; use crate::commands::status::StatusArgs; use crate::config::config::Config; pub fn create() -> Command { Command::new("status") .arg(Arg::new("directory").num_args(1).value_name("DIRECTORY")) .arg( Arg::new("nostyle") .long("nostyle") .help("Status with minium information and style"), ) .about("Show the working tree status") } pub fn handler(args: &ArgMatches) { commands::status::exec( StatusArgs { nostyle: args.contains_id("nostyle"), }, Config::from(args.get_one::("directory")), ); }