1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 05:27:45 +00:00

multicall: add --list to list all utils

This commit is contained in:
Terts Diepraam 2024-04-18 09:26:39 +02:00 committed by Sylvestre Ledru
parent 1162c53f56
commit b1ba249528

View file

@ -90,13 +90,20 @@ fn main() {
None => not_found(&util_os),
};
if util == "completion" {
gen_completions(args, &utils);
}
if util == "manpage" {
gen_manpage(args, &utils);
}
match util {
"completion" => gen_completions(args, &utils),
"manpage" => gen_manpage(args, &utils),
"--list" => {
let mut utils: Vec<_> = utils.keys().collect();
utils.sort();
for util in utils {
println!("{util}");
}
process::exit(0);
}
// Not a special command: fallthrough to calling a util
_ => {}
};
match utils.get(util) {
Some(&(uumain, _)) => {