[git commit] *: --help tweaks

Denys Vlasenko vda.linux at googlemail.com
Mon Jun 14 18:47:20 UTC 2021


commit: https://git.busybox.net/busybox/commit/?id=e2b9215868a3d72691e5bc0f887354254606447b
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

function                                             old     new   delta
packed_usage                                       33589   33552     -37

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/bbunzip.c  | 10 +++++++---
 archival/bzip2.c    |  4 +++-
 archival/gzip.c     |  4 +++-
 archival/lzop.c     |  1 +
 coreutils/chgrp.c   |  8 ++++++--
 coreutils/chmod.c   |  7 ++++---
 coreutils/chown.c   | 10 +++++++---
 coreutils/cut.c     |  1 +
 coreutils/echo.c    |  6 +++---
 coreutils/id.c      |  2 +-
 e2fsprogs/chattr.c  | 23 ++++++++++++-----------
 editors/cmp.c       |  2 +-
 findutils/grep.c    |  4 ++--
 miscutils/flashcp.c |  4 ++--
 procps/free.c       |  2 +-
 procps/kill.c       |  2 +-
 shell/ash.c         |  2 +-
 shell/hush.c        |  2 +-
 sysklogd/logger.c   |  2 +-
 util-linux/dmesg.c  |  2 +-
 util-linux/ionice.c |  3 ++-
 21 files changed, 61 insertions(+), 40 deletions(-)

diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index d639f307e..0ac059c19 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -284,7 +284,7 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
-//usage:     "\n	-t	Test file integrity"
+//usage:     "\n	-t	Test integrity"
 //usage:
 //usage:#define gunzip_example_usage
 //usage:       "$ ls -la /tmp/BusyBox*\n"
@@ -407,6 +407,8 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
+//usage:     "\n	-t	Test integrity"
+//usage:
 //usage:#define bzcat_trivial_usage
 //usage:       "[FILE]..."
 //usage:#define bzcat_full_usage "\n\n"
@@ -465,6 +467,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
+//usage:     "\n	-t	Test integrity"
 //usage:
 //usage:#define lzma_trivial_usage
 //usage:       "-d [-cfk] [FILE]..."
@@ -474,6 +477,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
+//usage:     "\n	-t	Test integrity"
 //usage:
 //usage:#define lzcat_trivial_usage
 //usage:       "[FILE]..."
@@ -536,7 +540,7 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
-//usage:     "\n	-t	Test file integrity"
+//usage:     "\n	-t	Test integrity"
 //usage:
 //usage:#define xz_trivial_usage
 //usage:       "-d [-cfk] [FILE]..."
@@ -546,7 +550,7 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
-//usage:     "\n	-t	Test file integrity"
+//usage:     "\n	-t	Test integrity"
 //usage:
 //usage:#define xzcat_trivial_usage
 //usage:       "[FILE]..."
diff --git a/archival/bzip2.c b/archival/bzip2.c
index ac5db0880..bce13cf93 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -56,11 +56,13 @@
 //usage:     "\n	-1..9	Compression level"
 //usage:	IF_FEATURE_BZIP2_DECOMPRESS(
 //usage:     "\n	-d	Decompress"
-//usage:     "\n	-t	Test file integrity"
 //usage:	)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
+//usage:	IF_FEATURE_BZIP2_DECOMPRESS(
+//usage:     "\n	-t	Test integrity"
+//usage:	)
 
 #include "libbb.h"
 #include "bb_archive.h"
diff --git a/archival/gzip.c b/archival/gzip.c
index d9c730f13..91bd4d09d 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -77,11 +77,13 @@ aa:      85.1% -- replaced with aa.gz
 //usage:	)
 //usage:	IF_FEATURE_GZIP_DECOMPRESS(
 //usage:     "\n	-d	Decompress"
-//usage:     "\n	-t	Test file integrity"
 //usage:	)
 //usage:     "\n	-c	Write to stdout"
 //usage:     "\n	-f	Force"
 //usage:     "\n	-k	Keep input files"
+//usage:	IF_FEATURE_GZIP_DECOMPRESS(
+//usage:     "\n	-t	Test integrity"
+//usage:	)
 //usage:
 //usage:#define gzip_example_usage
 //usage:       "$ ls -la /tmp/busybox*\n"
diff --git a/archival/lzop.c b/archival/lzop.c
index bdd21598c..74df8ff03 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -86,6 +86,7 @@
 //usage:     "\n	-f	Force"
 //usage:     "\n	-U	Delete input files"
 ///////:     "\n	-k	Keep input files" (default, so why bother documenting?)
+//usage:     "\n	-t	Test integrity"
 //usage:     "\n	-v	Verbose"
 //usage:     "\n	-F	Don't verify checksum"
 
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 0c2060981..e6ac316e5 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -23,13 +23,17 @@
 //usage:#define chgrp_trivial_usage
 //usage:       "[-Rh"IF_DESKTOP("LHPcvf")"]... GROUP FILE..."
 //usage:#define chgrp_full_usage "\n\n"
-//usage:       "Change the group membership of FILEs to GROUP\n"
-//usage:     "\n	-R	Recurse"
+//usage:       "Change the group membership of FILEs to GROUP"
+//usage:     "\n"
 //usage:     "\n	-h	Affect symlinks instead of symlink targets"
 //usage:	IF_DESKTOP(
 //usage:     "\n	-L	Traverse all symlinks to directories"
 //usage:     "\n	-H	Traverse symlinks on command line only"
 //usage:     "\n	-P	Don't traverse symlinks (default)"
+//usage:	)
+//next 4 options are the same for chmod/chown/chgrp:
+//usage:     "\n	-R	Recurse"
+//usage:	IF_DESKTOP(
 //usage:     "\n	-c	List changed files"
 //usage:     "\n	-v	Verbose"
 //usage:     "\n	-f	Hide errors"
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index d2988c490..e260adab2 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -26,12 +26,13 @@
 //usage:#define chmod_trivial_usage
 //usage:       "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
 //usage:#define chmod_full_usage "\n\n"
-//usage:       "Each MODE is one or more of the letters ugoa, one of the\n"
-//usage:       "symbols +-= and one or more of the letters rwxst\n"
+//usage:       "MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]"
+//usage:     "\n"
+//next 4 options are the same for chmod/chown/chgrp:
 //usage:     "\n	-R	Recurse"
 //usage:	IF_DESKTOP(
 //usage:     "\n	-c	List changed files"
-//usage:     "\n	-v	List all files"
+//usage:     "\n	-v	Verbose"
 //usage:     "\n	-f	Hide errors"
 //usage:	)
 //usage:
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 170507147..528a2a05a 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -28,15 +28,19 @@
 //usage:#define chown_trivial_usage
 //usage:       "[-Rh"IF_DESKTOP("LHPcvf")"]... USER[:[GRP]] FILE..."
 //usage:#define chown_full_usage "\n\n"
-//usage:       "Change the owner and/or group of FILEs to USER and/or GRP\n"
-//usage:     "\n	-R	Recurse"
+//usage:       "Change the owner and/or group of FILEs to USER and/or GRP"
+//usage:     "\n"
 //usage:     "\n	-h	Affect symlinks instead of symlink targets"
 //usage:	IF_DESKTOP(
 //usage:     "\n	-L	Traverse all symlinks to directories"
 //usage:     "\n	-H	Traverse symlinks on command line only"
 //usage:     "\n	-P	Don't traverse symlinks (default)"
+//usage:	)
+//next 4 options are the same for chmod/chown/chgrp:
+//usage:     "\n	-R	Recurse"
+//usage:	IF_DESKTOP(
 //usage:     "\n	-c	List changed files"
-//usage:     "\n	-v	List all files"
+//usage:     "\n	-v	Verbose"
 //usage:     "\n	-f	Hide errors"
 //usage:	)
 //usage:
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 5897d82b6..cc3c32576 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -29,6 +29,7 @@
 //usage:     "\n	-s	Output only lines containing delimiter"
 //usage:     "\n	-f LIST	Print only these fields"
 //usage:     "\n	-n	Ignored"
+//(manpage:-n	with -b: don't split multibyte characters)
 //usage:
 //usage:#define cut_example_usage
 //usage:       "$ echo \"Hello world\" | cut -f 1 -d ' '\n"
diff --git a/coreutils/echo.c b/coreutils/echo.c
index aab177cee..82f0358b6 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -43,10 +43,10 @@
 //usage:#define echo_trivial_usage
 //usage:	IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..."
 //usage:#define echo_full_usage "\n\n"
-//usage:       "Print the specified ARGs to stdout"
+//usage:       "Print ARGs to stdout"
 //usage:	IF_FEATURE_FANCY_ECHO( "\n"
-//usage:     "\n	-n	Suppress trailing newline"
-//usage:     "\n	-e	Interpret backslash escapes (i.e., \\t=tab)"
+//usage:     "\n	-n	No trailing newline"
+//usage:     "\n	-e	Interpret backslash escapes (\\t=tab etc)"
 //usage:     "\n	-E	Don't interpret backslash escapes (default)"
 //usage:	)
 //usage:
diff --git a/coreutils/id.c b/coreutils/id.c
index f453a87ae..18bda3c55 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -52,7 +52,7 @@
 //usage:#define groups_trivial_usage
 //usage:       "[USER]"
 //usage:#define groups_full_usage "\n\n"
-//usage:       "Print the group memberships of USER or for the current process"
+//usage:       "Print the groups USER is in"
 //usage:
 //usage:#define groups_example_usage
 //usage:       "$ groups\n"
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c
index c37469021..1d267f7a4 100644
--- a/e2fsprogs/chattr.c
+++ b/e2fsprogs/chattr.c
@@ -24,22 +24,23 @@
 //usage:#define chattr_full_usage "\n\n"
 //usage:       "Change ext2 file attributes\n"
 //usage:     "\n	-R	Recurse"
-//usage:     "\n	-v VER	Set version/generation number"
+//TODD?      "\n	-p NUM	Set project number"
+//usage:     "\n	-v NUM	Set version/generation number"
 //-V, -f accepted but ignored
 //usage:     "\nModifiers:"
 //usage:     "\n	-,+,=	Remove/add/set attributes"
 //usage:     "\nAttributes:"
-//usage:     "\n	A	Don't track atime"
-//usage:     "\n	a	Append mode only"
-//usage:     "\n	c	Enable compress"
-//usage:     "\n	D	Write dir contents synchronously"
+//usage:     "\n	A	No atime"
+//usage:     "\n	a	Append only"
+//usage:     "\n	c	Compressed"
+//usage:     "\n	D	Synchronous dir updates"
 //usage:     "\n	d	Don't backup with dump"
-//usage:     "\n	i	Cannot be modified (immutable)"
-//usage:     "\n	j	Write all data to journal first"
-//usage:     "\n	s	Zero disk storage when deleted"
-//usage:     "\n	S	Write synchronously"
-//usage:     "\n	t	Disable tail-merging of partial blocks with other files"
-//usage:     "\n	u	Allow file to be undeleted"
+//usage:     "\n	i	Immutable"
+//usage:     "\n	j	Write data to journal first"
+//usage:     "\n	s	Zero storage when deleted"
+//usage:     "\n	S	Synchronous file updates"
+//usage:     "\n	t	Don't tail-merge with other files"
+//usage:     "\n	u	Allow undelete"
 
 #include "libbb.h"
 #include "e2fs_lib.h"
diff --git a/editors/cmp.c b/editors/cmp.c
index 6e27a841a..e106d814e 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -18,7 +18,7 @@
 //kbuild:lib-$(CONFIG_CMP) += cmp.o
 
 //usage:#define cmp_trivial_usage
-//usage:       "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
+//usage:       "[-ls] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
 //usage:#define cmp_full_usage "\n\n"
 //usage:       "Compare FILE1 with FILE2 (or stdin)\n"
 //usage:     "\n	-l	Write the byte numbers (decimal) and values (octal)"
diff --git a/findutils/grep.c b/findutils/grep.c
index 10cca83e7..d84766ca9 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -63,8 +63,8 @@
 //usage:       "[-HhnlLoqvsrRiwFE"
 //usage:	IF_EXTRA_COMPAT("z")
 //usage:       "] [-m N] "
-//usage:	IF_FEATURE_GREP_CONTEXT("[-A/B/C N] ")
-//usage:       "PATTERN/-e PATTERN.../-f FILE [FILE]..."
+//usage:	IF_FEATURE_GREP_CONTEXT("[-A|B|C N] ")
+//usage:       "PATTERN | -e PATTERN... | -f FILE [FILE]..."
 //usage:#define grep_full_usage "\n\n"
 //usage:       "Search for PATTERN in FILEs (or stdin)\n"
 //usage:     "\n	-H	Add 'filename:' prefix"
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
index 1ca9d158d..93c80cc6c 100644
--- a/miscutils/flashcp.c
+++ b/miscutils/flashcp.c
@@ -19,9 +19,9 @@
 //kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o
 
 //usage:#define flashcp_trivial_usage
-//usage:       "-v FILE MTD_DEVICE"
+//usage:       "[-v] FILE MTD_DEVICE"
 //usage:#define flashcp_full_usage "\n\n"
-//usage:       "Copy an image to MTD device\n"
+//usage:       "Copy FILE to MTD device\n"
 //usage:     "\n	-v	Verbose"
 
 #include "libbb.h"
diff --git a/procps/free.c b/procps/free.c
index 0adef501f..568362913 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -19,7 +19,7 @@
 //kbuild:lib-$(CONFIG_FREE) += free.o
 
 //usage:#define free_trivial_usage
-//usage:       "" IF_DESKTOP("[-b/k/m/g]")
+//usage:       "" IF_DESKTOP("[-bkmg]")
 //usage:#define free_full_usage "\n\n"
 //usage:       "Display the amount of free and used system memory"
 //usage:
diff --git a/procps/kill.c b/procps/kill.c
index 4a2eab613..8f10e21ab 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -59,7 +59,7 @@
 //usage:       "$ kill 252\n"
 //usage:
 //usage:#define killall_trivial_usage
-//usage:       "[-l] [-q] [-SIG] PROCESS_NAME..."
+//usage:       "[-lq] [-SIG] PROCESS_NAME..."
 //usage:#define killall_full_usage "\n\n"
 //usage:       "Send a signal (default: TERM) to given processes\n"
 //usage:     "\n	-l	List all signal names and numbers"
diff --git a/shell/ash.c b/shell/ash.c
index bcf7a3470..85d43ca6f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14398,7 +14398,7 @@ init(void)
 
 
 //usage:#define ash_trivial_usage
-//usage:	"[-il] [-/+Cabefmnuvx] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS] / -s [ARGS]]"
+//usage:	"[-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] | FILE [ARGS] | -s [ARGS]]"
 ////////	comes from ^^^^^^^^^^optletters
 //usage:#define ash_full_usage "\n\n"
 //usage:	"Unix shell interpreter"
diff --git a/shell/hush.c b/shell/hush.c
index 77921e11c..4a049899b 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -339,7 +339,7 @@
  * therefore we don't show them either.
  */
 //usage:#define hush_trivial_usage
-//usage:	"[-enxl] [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS] / -s [ARGS]]"
+//usage:	"[-enxl] [-c 'SCRIPT' [ARG0 [ARGS]] | FILE [ARGS] | -s [ARGS]]"
 //usage:#define hush_full_usage "\n\n"
 //usage:	"Unix shell interpreter"
 
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 9422b6ea7..04b2c8e3b 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -26,7 +26,7 @@
 //usage:       "Write MESSAGE (or stdin) to syslog\n"
 //usage:     "\n	-s	Log to stderr as well as the system log"
 //usage:     "\n	-t TAG	Log using the specified tag (defaults to user name)"
-//usage:     "\n	-p PRIO	Priority (numeric or facility.level pair)"
+//usage:     "\n	-p PRIO	Priority (number or FACILITY.LEVEL pair)"
 //usage:
 //usage:#define logger_example_usage
 //usage:       "$ logger \"hello\"\n"
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index dc4e57169..6670b84de 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -46,7 +46,7 @@
 //kbuild:lib-$(CONFIG_DMESG) += dmesg.o
 
 //usage:#define dmesg_trivial_usage
-//usage:       "[-c] [-n LEVEL] [-s SIZE]"
+//usage:       "[-cr] [-n LEVEL] [-s SIZE]"
 //usage:#define dmesg_full_usage "\n\n"
 //usage:       "Print or control the kernel ring buffer\n"
 //usage:     "\n	-c		Clear ring buffer after printing"
diff --git a/util-linux/ionice.c b/util-linux/ionice.c
index c8fb1a777..ff5177abb 100644
--- a/util-linux/ionice.c
+++ b/util-linux/ionice.c
@@ -18,7 +18,8 @@
 //kbuild:lib-$(CONFIG_IONICE) += ionice.o
 
 //usage:#define ionice_trivial_usage
-//usage:	"[-c 1-3] [-n 0-7] [-p PID] [PROG ARGS]"
+//usage:	"[-c 1-3] [-n 0-7] { -p PID | PROG ARGS }"
+//TODO: | -P PGID | -u UID; also -pPu can take _list of_ IDs
 //usage:#define ionice_full_usage "\n\n"
 //usage:       "Change I/O priority and class\n"
 //usage:     "\n	-c N	Class. 1:realtime 2:best-effort 3:idle"


More information about the busybox-cvs mailing list