diff --git a/src/commands/list.rs b/src/commands/list.rs index 36093909..b7a42916 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs @@ -152,6 +152,10 @@ pub struct Cli { #[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())] colorize: bool, + /// Quiet mode + #[arg(short, long)] + quiet: bool, + /// Verbose mode #[arg(short, long, action = clap::ArgAction::Count)] verbose: u8, @@ -201,7 +205,7 @@ pub fn list(argv: Vec) -> i32 { let opt = Cli::parse_from(argv); // TODO: centralize this on the top level CLI - logging::setup(false, opt.verbose, opt.colorize); + logging::setup(opt.quiet, opt.verbose, opt.colorize); if let Err(e) = cmd_list_inner(&opt) { error!("Fatal error: {}", e); diff --git a/src/commands/mount.rs b/src/commands/mount.rs index bdbbfab9..35b7ae2a 100644 --- a/src/commands/mount.rs +++ b/src/commands/mount.rs @@ -250,6 +250,10 @@ pub struct Cli { #[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())] colorize: bool, + /// Quiet mode + #[arg(short, long)] + quiet: bool, + /// Verbose mode #[arg(short, long, action = clap::ArgAction::Count)] verbose: u8, @@ -379,7 +383,7 @@ pub fn mount(mut argv: Vec, symlink_cmd: Option<&str>) -> i32 { let cli = Cli::parse_from(argv); // TODO: centralize this on the top level CLI - logging::setup(false, cli.verbose, cli.colorize); + logging::setup(cli.quiet, cli.verbose, cli.colorize); if let Err(e) = cmd_mount_inner(&cli) { error!("Fatal error: {}", e);