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

Merge pull request #6251 from tertsdiepraam/multicall-list

multicall: add --list to list all utils
This commit is contained in:
Sylvestre Ledru 2024-05-01 10:17:01 +02:00 committed by GitHub
commit 45bf1991d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,13 +90,20 @@ fn main() {
None => not_found(&util_os),
};
if util == "completion" {
gen_completions(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}");
}
if util == "manpage" {
gen_manpage(args, &utils);
process::exit(0);
}
// Not a special command: fallthrough to calling a util
_ => {}
};
match utils.get(util) {
Some(&(uumain, _)) => {