help text: replace [OPTIONS] with actual options (if not too long)

function                                             old     new   delta
packed_usage                                       33620   33665     +45

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-12-13 22:34:05 +01:00
parent 63139b531f
commit 84d5eddb25
14 changed files with 17 additions and 33 deletions

View File

@ -38,7 +38,7 @@
/* http://www.opengroup.org/onlinepubs/007904975/utilities/cp.html */
//usage:#define cp_trivial_usage
//usage: "[OPTIONS] SOURCE... DEST"
//usage: "[-arPLHpfilsTu] SOURCE... DEST"
//usage:#define cp_full_usage "\n\n"
//usage: "Copy SOURCE(s) to DEST\n"
//usage: "\n -a Same as -dpR"

View File

@ -21,14 +21,14 @@
/* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */
//usage:#define ln_trivial_usage
//usage: "[OPTIONS] TARGET... LINK|DIR"
//usage: "[-sfnbtv] [-S SUF] TARGET... LINK|DIR"
//usage:#define ln_full_usage "\n\n"
//usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n"
//usage: "\n -s Make symlinks instead of hardlinks"
//usage: "\n -f Remove existing destinations"
//usage: "\n -n Don't dereference symlinks - treat like normal file"
//usage: "\n -b Make a backup of the target (if exists) before link operation"
//usage: "\n -S suf Use suffix instead of ~ when making backup files"
//usage: "\n -S SUF Use suffix instead of ~ when making backup files"
//usage: "\n -T Treat LINK as a file, not DIR"
//usage: "\n -v Verbose"
//usage:

View File

@ -19,7 +19,7 @@
//usage:#define nl_full_usage "\n\n"
//usage: "Write FILEs to standard output with line numbers added\n"
//usage: "\n -b STYLE Which lines to number - a: all, t: nonempty, n: none"
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TODO: support "pBRE": number only lines thatmatch regexp BRE"
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TODO: support "pBRE": number only lines that match regexp BRE"
////usage: "\n -f STYLE footer lines"
////usage: "\n -h STYLE header lines"
////usage: "\n -d CC use CC for separating logical pages"

View File

@ -18,7 +18,7 @@
//kbuild:lib-$(CONFIG_PASTE) += paste.o
//usage:#define paste_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage: "[-d LIST] [-s] [FILE]..."
//usage:#define paste_full_usage "\n\n"
//usage: "Paste lines from each input file, separated with tab\n"
//usage: "\n -d LIST Use delimiters from LIST, not tab"

View File

@ -31,7 +31,7 @@
//kbuild:lib-$(CONFIG_PATCH) += patch.o
//usage:#define patch_trivial_usage
//usage: "[OPTIONS] [ORIGFILE [PATCHFILE]]"
//usage: "[-RNE] [-p N] [-i DIFF] [ORIGFILE [PATCHFILE]]"
//usage:#define patch_full_usage "\n\n"
//usage: " -p N Strip N leading components from file names"
//usage: "\n -i DIFF Read DIFF instead of stdin"

View File

@ -166,7 +166,7 @@
//kbuild:lib-$(CONFIG_VI) += vi.o
//usage:#define vi_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[FILE]..."
//usage:#define vi_full_usage "\n\n"
//usage: "Edit FILE\n"
//usage: IF_FEATURE_VI_COLON(

View File

@ -32,22 +32,14 @@
//kbuild:lib-$(CONFIG_MKPASSWD) += cryptpw.o
//usage:#define cryptpw_trivial_usage
//usage: "[OPTIONS] [PASSWORD] [SALT]"
//usage: "[-s] [-p N] [-m TYPE] [-S SALT] [PASSWORD] [SALT]"
/* We do support -s, we just don't mention it */
//usage:#define cryptpw_full_usage "\n\n"
//usage: "Print crypt(3) hashed PASSWORD\n"
//usage: IF_LONG_OPTS(
//usage: "\n -P,--password-fd N Read password from fd N"
/* //usage: "\n -s,--stdin Use stdin; like -P0" */
//usage: "\n -m,--method TYPE "CRYPT_METHODS_HELP_STR
//usage: "\n -S,--salt SALT"
//usage: )
//usage: IF_NOT_LONG_OPTS(
//usage: "\n -P N Read password from fd N"
/* //usage: "\n -s Use stdin; like -P0" */
//usage: "\n -m TYPE "CRYPT_METHODS_HELP_STR
//usage: "\n -S SALT"
//usage: )
#include "libbb.h"

View File

@ -26,7 +26,7 @@
//usage:#if !ENABLE_MODPROBE_SMALL
//usage:#define insmod_trivial_usage
//usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE")
//usage: IF_FEATURE_2_4_MODULES("[-fkvqLx] MODULE")
//usage: IF_NOT_FEATURE_2_4_MODULES("FILE")
//usage: IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...")
//usage:#define insmod_full_usage "\n\n"

View File

@ -36,7 +36,7 @@
//kbuild:lib-$(CONFIG_IPCALC) += ipcalc.o
//usage:#define ipcalc_trivial_usage
//usage: "[OPTIONS] ADDRESS"
//usage: "[-bnm"IF_FEATURE_IPCALC_FANCY("phs")"] ADDRESS"
//usage: IF_FEATURE_IPCALC_FANCY("[/PREFIX]") " [NETMASK]"
//usage:#define ipcalc_full_usage "\n\n"
//usage: "Calculate and display network settings from IP address\n"

View File

@ -19,7 +19,7 @@
//kbuild:lib-$(CONFIG_FUSER) += fuser.o
//usage:#define fuser_trivial_usage
//usage: "[OPTIONS] FILE or PORT/PROTO"
//usage: "[-msk46] [-SIGNAL] FILE or PORT/PROTO"
//usage:#define fuser_full_usage "\n\n"
//usage: "Find processes which use FILEs or PORTs\n"
//usage: "\n -m Find processes which use same fs as FILEs"

View File

@ -39,7 +39,7 @@
//usage:#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
//usage:#define pidof_trivial_usage
//usage: "[OPTIONS] [NAME]..."
//usage: IF_FEATURE_PIDOF_SINGLE("[-s] ")IF_FEATURE_PIDOF_OMIT("[-o PID] ")"[NAME]..."
//usage:#define USAGE_PIDOF "\n"
//usage:#else
//usage:#define pidof_trivial_usage

View File

@ -21,7 +21,7 @@
//kbuild:lib-$(CONFIG_LOGGER) += syslogd_and_logger.o
//usage:#define logger_trivial_usage
//usage: "[OPTIONS] [MESSAGE]"
//usage: "[-s] [-t TAG] [-p PRIO] [MESSAGE]"
//usage:#define logger_full_usage "\n\n"
//usage: "Write MESSAGE (or stdin) to syslog\n"
//usage: "\n -s Log to stderr as well as the system log"

View File

@ -20,18 +20,10 @@
//usage:#define fstrim_trivial_usage
//usage: "[OPTIONS] MOUNTPOINT"
//usage:#define fstrim_full_usage "\n\n"
//usage: IF_LONG_OPTS(
//usage: " -o,--offset OFFSET Offset in bytes to discard from"
//usage: "\n -l,--length LEN Bytes to discard"
//usage: "\n -m,--minimum MIN Minimum extent length"
//usage: "\n -v,--verbose Print number of discarded bytes"
//usage: )
//usage: IF_NOT_LONG_OPTS(
//usage: " -o OFFSET Offset in bytes to discard from"
//usage: "\n -l LEN Bytes to discard"
//usage: "\n -m MIN Minimum extent length"
//usage: "\n -v Print number of discarded bytes"
//usage: )
#include "libbb.h"
#include <linux/fs.h>

View File

@ -41,16 +41,16 @@
//kbuild:lib-$(CONFIG_UMOUNT) += umount.o
//usage:#define umount_trivial_usage
//usage: "[OPTIONS] FILESYSTEM|DIRECTORY"
//usage: "[-rlf"IF_FEATURE_MTAB_SUPPORT("m")IF_FEATURE_MOUNT_LOOP("d")IF_FEATURE_UMOUNT_ALL("a")"] [-t FSTYPE] FILESYSTEM|DIRECTORY"
//usage:#define umount_full_usage "\n\n"
//usage: "Unmount file systems\n"
//usage: "Unmount filesystems\n"
//usage: IF_FEATURE_UMOUNT_ALL(
//usage: "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab")
//usage: "\n -a Unmount all filesystems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab")
//usage: )
//usage: IF_FEATURE_MTAB_SUPPORT(
//usage: "\n -n Don't erase /etc/mtab entries"
//usage: )
//usage: "\n -r Try to remount devices as read-only if mount is busy"
//usage: "\n -r Remount devices read-only if mount is busy"
//usage: "\n -l Lazy umount (detach filesystem)"
//usage: "\n -f Force umount (i.e., unreachable NFS server)"
//usage: IF_FEATURE_MOUNT_LOOP(