1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +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), None => not_found(&util_os),
}; };
if util == "completion" { match util {
gen_completions(args, &utils); "completion" => gen_completions(args, &utils),
} "manpage" => gen_manpage(args, &utils),
"--list" => {
if util == "manpage" { let mut utils: Vec<_> = utils.keys().collect();
gen_manpage(args, &utils); utils.sort();
} for util in utils {
println!("{util}");
}
process::exit(0);
}
// Not a special command: fallthrough to calling a util
_ => {}
};
match utils.get(util) { match utils.get(util) {
Some(&(uumain, _)) => { Some(&(uumain, _)) => {