mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #6692 from cakebaker/coreutils_add_list_option_to_help
bin/coreutils: add `--list` to help output
This commit is contained in:
commit
db402875f6
1 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,10 @@ include!(concat!(env!("OUT_DIR"), "/uutils_map.rs"));
|
||||||
|
|
||||||
fn usage<T>(utils: &UtilityMap<T>, name: &str) {
|
fn usage<T>(utils: &UtilityMap<T>, name: &str) {
|
||||||
println!("{name} {VERSION} (multi-call binary)\n");
|
println!("{name} {VERSION} (multi-call binary)\n");
|
||||||
println!("Usage: {name} [function [arguments...]]\n");
|
println!("Usage: {name} [function [arguments...]]");
|
||||||
|
println!(" {name} --list\n");
|
||||||
|
println!("Options:");
|
||||||
|
println!(" --list lists all defined functions, one per row\n");
|
||||||
println!("Currently defined functions:\n");
|
println!("Currently defined functions:\n");
|
||||||
#[allow(clippy::map_clone)]
|
#[allow(clippy::map_clone)]
|
||||||
let mut utils: Vec<&str> = utils.keys().map(|&s| s).collect();
|
let mut utils: Vec<&str> = utils.keys().map(|&s| s).collect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue