From f0b983ba8f64437d75f0a72f82df2b23f40af09e Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 12 Sep 2024 14:55:05 +0200 Subject: [PATCH] bin/coreutils: add --list to help output --- src/bin/coreutils.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/coreutils.rs b/src/bin/coreutils.rs index 5d5a9978bf0..5feb6fce422 100644 --- a/src/bin/coreutils.rs +++ b/src/bin/coreutils.rs @@ -21,7 +21,10 @@ include!(concat!(env!("OUT_DIR"), "/uutils_map.rs")); fn usage(utils: &UtilityMap, 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();