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:
commit
45bf1991d1
1 changed files with 14 additions and 7 deletions
|
@ -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, _)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue