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),
|
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, _)) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue