From 00e94787e0e473f733b15da24ebe64ed0f595a9e Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 15 Feb 2022 18:27:30 +0000 Subject: improved status command allow specifying the paths that the status should be printed for instead of displaying everything --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 132b418..acd0e38 100644 --- a/src/main.rs +++ b/src/main.rs @@ -214,10 +214,13 @@ fn command_mv(global_flags: Flags, args: MvArgs) -> anyhow::Result<()> { /// Shows information about links #[derive(Parser, Debug)] -struct StatusArgs {} +struct StatusArgs { + #[clap(default_value = ".")] + paths: Vec, +} -fn command_status(global_flags: Flags, _args: StatusArgs) -> anyhow::Result<()> { +fn command_status(global_flags: Flags, args: StatusArgs) -> anyhow::Result<()> { let dotup = utils::read_dotup(&global_flags)?; - dotup.status(); + dotup.status(args.paths.into_iter()); Ok(()) } -- cgit