Skip to content

Commit

Permalink
Merge pull request #6251 from tertsdiepraam/multicall-list
Browse files Browse the repository at this point in the history
multicall: add --list to list all utils
  • Loading branch information
sylvestre authored May 1, 2024
2 parents 3346b41 + b1ba249 commit 45bf199
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/bin/coreutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, _)) => {
Expand Down

0 comments on commit 45bf199

Please sign in to comment.