feat(status): started status without nsobject fully implemented

This commit is contained in:
grimhilt
2024-09-01 20:12:02 +02:00
parent fb57bd6565
commit c7bde2c8d5
11 changed files with 436 additions and 1 deletions

25
src/subcommands/status.rs Normal file
View 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")),
);
}