feat(status): started status without nsobject fully implemented
This commit is contained in:
25
src/subcommands/status.rs
Normal file
25
src/subcommands/status.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
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::<String>("directory")),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user