1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

bin/coreutils: add --list to help output

This commit is contained in:
Daniel Hofstetter 2024-09-12 14:55:05 +02:00
parent 7430856575
commit f0b983ba8f

View file

@ -21,7 +21,10 @@ include!(concat!(env!("OUT_DIR"), "/uutils_map.rs"));
fn usage<T>(utils: &UtilityMap<T>, name: &str) {
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");
#[allow(clippy::map_clone)]
let mut utils: Vec<&str> = utils.keys().map(|&s| s).collect();