count_only output flag accept no value

This commit is contained in:
foxx 2024-04-21 13:30:05 -04:00
parent 925d0d1e49
commit f5c3cbe037
2 changed files with 2 additions and 3 deletions

View File

@ -62,8 +62,7 @@ impl CompareMode {
println!("{}: {:?}", $msg, $ret.len()); println!("{}: {:?}", $msg, $ret.len());
} }
} else { } else {
$ret.iter().for_each(|e| println!("{e}")); println!("{}", $ret.len());
println!("{}: {:?}", $msg, $ret.len());
} }
}; };
} }

View File

@ -29,7 +29,7 @@ pub enum Commands {
#[arg(short, long)] #[arg(short, long)]
selection: Option<String>, selection: Option<String>,
/// OPTIONAL: when using selection specify to return count only or not /// OPTIONAL: when using selection specify to return count only or not
#[arg(short)] #[arg(short, default_value="false", num_args = 0..2)]
count_only: Option<bool>, count_only: Option<bool>,
}, },
} }