*: --help tweaks

function                                             old     new   delta
.rodata                                           103190  103189      -1
packed_usage                                       33590   33566     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-25)             Total: -25 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2021-06-13 01:08:48 +02:00
parent aece2c5f0f
commit 6b6826f0b8
10 changed files with 35 additions and 27 deletions

View File

@ -63,7 +63,7 @@
//usage: "\n -n Never overwrite files (default: ask)" //usage: "\n -n Never overwrite files (default: ask)"
//usage: "\n -o Overwrite" //usage: "\n -o Overwrite"
//usage: "\n -j Do not restore paths" //usage: "\n -j Do not restore paths"
//usage: "\n -p Print to stdout" //usage: "\n -p Write to stdout"
//usage: "\n -t Test" //usage: "\n -t Test"
//usage: "\n -q Quiet" //usage: "\n -q Quiet"
//usage: "\n -x FILE Exclude FILEs" //usage: "\n -x FILE Exclude FILEs"

View File

@ -39,12 +39,14 @@
/* http://www.opengroup.org/onlinepubs/007904975/utilities/env.html */ /* http://www.opengroup.org/onlinepubs/007904975/utilities/env.html */
//usage:#define env_trivial_usage //usage:#define env_trivial_usage
//usage: "[-iu] [-] [name=value]... [PROG ARGS]" //usage: "[-i] [-u NAME]... [-] [NAME=VALUE]... [PROG ARGS]"
// The "-" can occur only once (unlike, say, -i): it terminates option processing,
// so if it is followed by another "-" arg (or any option-looking arg),
// that arg will be taken as PROG (or even as NAME=VALUE, example: "-z=QWE").
//usage:#define env_full_usage "\n\n" //usage:#define env_full_usage "\n\n"
//usage: "Print the current environment or run PROG after setting up\n" //usage: "Print current environment or run PROG after setting up environment\n"
//usage: "the specified environment\n" //usage: "\n -, -i Start with empty environment"
//usage: "\n -, -i Start with an empty environment" //usage: "\n -u NAME Remove variable from environment"
//usage: "\n -u Remove variable from the environment"
#include "libbb.h" #include "libbb.h"

View File

@ -45,7 +45,7 @@
//usage:#define expr_trivial_usage //usage:#define expr_trivial_usage
//usage: "EXPRESSION" //usage: "EXPRESSION"
//usage:#define expr_full_usage "\n\n" //usage:#define expr_full_usage "\n\n"
//usage: "Print the value of EXPRESSION to stdout\n" //usage: "Print the value of EXPRESSION\n"
//usage: "\n" //usage: "\n"
//usage: "EXPRESSION may be:\n" //usage: "EXPRESSION may be:\n"
//usage: " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" //usage: " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n"
@ -63,7 +63,7 @@
//usage: " ARG1 % ARG2\n" //usage: " ARG1 % ARG2\n"
//usage: " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" //usage: " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n"
//usage: " match STRING REGEXP Same as STRING : REGEXP\n" //usage: " match STRING REGEXP Same as STRING : REGEXP\n"
//usage: " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" //usage: " substr STRING POS LEN Substring of STRING, POS counts from 1\n"
//usage: " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" //usage: " index STRING CHARS Index in STRING where any CHARS is found, or 0\n"
//usage: " length STRING Length of STRING\n" //usage: " length STRING Length of STRING\n"
//usage: " quote TOKEN Interpret TOKEN as a string, even if\n" //usage: " quote TOKEN Interpret TOKEN as a string, even if\n"

View File

@ -183,7 +183,7 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
//usage:#define base32_trivial_usage //usage:#define base32_trivial_usage
//usage: "[-d] [-w COL] [FILE]" //usage: "[-d] [-w COL] [FILE]"
//usage:#define base32_full_usage "\n\n" //usage:#define base32_full_usage "\n\n"
//usage: "Base32 encode or decode FILE to standard output" //usage: "Base32 encode or decode FILE to standard output\n"
//usage: "\n -d Decode data" //usage: "\n -d Decode data"
//usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)" //usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)"
////usage: "\n -i When decoding, ignore non-alphabet characters" ////usage: "\n -i When decoding, ignore non-alphabet characters"
@ -191,7 +191,7 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
//usage:#define base64_trivial_usage //usage:#define base64_trivial_usage
//usage: "[-d] [-w COL] [FILE]" //usage: "[-d] [-w COL] [FILE]"
//usage:#define base64_full_usage "\n\n" //usage:#define base64_full_usage "\n\n"
//usage: "Base64 encode or decode FILE to standard output" //usage: "Base64 encode or decode FILE to standard output\n"
//usage: "\n -d Decode data" //usage: "\n -d Decode data"
//usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)" //usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)"
////usage: "\n -i When decoding, ignore non-alphabet characters" ////usage: "\n -i When decoding, ignore non-alphabet characters"

View File

@ -37,6 +37,7 @@ incorrect, please send in an update.
=for html <br> =for html <br>
Emanuele Aina <emanuele.aina@tiscali.it> Emanuele Aina <emanuele.aina@tiscali.it>
run-parts run-parts
=for html <br> =for html <br>

View File

@ -70,7 +70,7 @@
//usage:#define sed_full_usage "\n\n" //usage:#define sed_full_usage "\n\n"
//usage: " -e CMD Add CMD to sed commands to be executed" //usage: " -e CMD Add CMD to sed commands to be executed"
//usage: "\n -f FILE Add FILE contents to sed commands to be executed" //usage: "\n -f FILE Add FILE contents to sed commands to be executed"
//usage: "\n -i[SFX] Edit files in-place (otherwise sends to stdout)" //usage: "\n -i[SFX] Edit files in-place (otherwise write to stdout)"
//usage: "\n Optionally back files up, appending SFX" //usage: "\n Optionally back files up, appending SFX"
//usage: "\n -n Suppress automatic printing of pattern space" //usage: "\n -n Suppress automatic printing of pattern space"
//usage: "\n -r,-E Use extended regex syntax" //usage: "\n -r,-E Use extended regex syntax"

View File

@ -181,7 +181,7 @@
//kbuild:lib-$(CONFIG_VI) += vi.o //kbuild:lib-$(CONFIG_VI) += vi.o
//usage:#define vi_trivial_usage //usage:#define vi_trivial_usage
//usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[FILE]..." //usage: IF_FEATURE_VI_COLON("[-c CMD] ")IF_FEATURE_VI_READONLY("[-R] ")"[-H] [FILE]..."
//usage:#define vi_full_usage "\n\n" //usage:#define vi_full_usage "\n\n"
//usage: "Edit FILE\n" //usage: "Edit FILE\n"
//usage: IF_FEATURE_VI_COLON( //usage: IF_FEATURE_VI_COLON(
@ -191,6 +191,7 @@
//usage: "\n -R Read-only" //usage: "\n -R Read-only"
//usage: ) //usage: )
//usage: "\n -H List available features" //usage: "\n -H List available features"
// note: non-standard, "vim -H" is Hebrew mode (bidi support)
#include "libbb.h" #include "libbb.h"
// Should be after libbb.h: on some systems regex.h needs sys/types.h: // Should be after libbb.h: on some systems regex.h needs sys/types.h:
@ -4748,7 +4749,11 @@ int vi_main(int argc, char **argv)
initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN);
} }
#endif #endif
while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) { while ((c = getopt(argc, argv,
#if ENABLE_FEATURE_VI_CRASHME
"C"
#endif
"RHh" IF_FEATURE_VI_COLON("c:"))) != -1) {
switch (c) { switch (c) {
#if ENABLE_FEATURE_VI_CRASHME #if ENABLE_FEATURE_VI_CRASHME
case 'C': case 'C':

View File

@ -18,14 +18,14 @@
//kbuild:lib-$(CONFIG_MICROCOM) += microcom.o //kbuild:lib-$(CONFIG_MICROCOM) += microcom.o
//usage:#define microcom_trivial_usage //usage:#define microcom_trivial_usage
//usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" //usage: "[-d DELAY_MS] [-t TIMEOUT_MS ] [-s SPEED] [-X] TTY"
//usage:#define microcom_full_usage "\n\n" //usage:#define microcom_full_usage "\n\n"
//usage: "Copy bytes for stdin to TTY and from TTY to stdout\n" //usage: "Copy bytes from stdin to TTY and from TTY to stdout\n"
//usage: "\n -d Wait up to DELAY ms for TTY output before sending every" //usage: "\n -d DELAY Wait up to DELAY ms for TTY output before sending"
//usage: "\n next byte to it" //usage: "\n every next byte to it"
//usage: "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" //usage: "\n -t TIMEOUT Exit if both stdin and TTY are silent for TIMEOUT ms"
//usage: "\n -s Set serial line to SPEED" //usage: "\n -s SPEED Set serial line to SPEED"
//usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin" //usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin"
#include "libbb.h" #include "libbb.h"
#include "common_bufsiz.h" #include "common_bufsiz.h"

View File

@ -20,12 +20,12 @@
//usage: "COMMAND [OPTIONS]" //usage: "COMMAND [OPTIONS]"
//usage:#define vconfig_full_usage "\n\n" //usage:#define vconfig_full_usage "\n\n"
//usage: "Create and remove virtual ethernet devices\n" //usage: "Create and remove virtual ethernet devices\n"
//usage: "\n add IFACE VLAN_ID" //usage: "\n add IFACE VLAN_ID"
//usage: "\n rem VLAN_NAME" //usage: "\n rem VLAN_NAME"
//usage: "\n set_flag IFACE 0|1 VLAN_QOS" //usage: "\n set_flag IFACE 0|1 VLAN_QOS"
//usage: "\n set_egress_map VLAN_NAME SKB_PRIO VLAN_QOS" //usage: "\n set_egress_map VLAN_NAME SKB_PRIO VLAN_QOS"
//usage: "\n set_ingress_map VLAN_NAME SKB_PRIO VLAN_QOS" //usage: "\n set_ingress_map VLAN_NAME SKB_PRIO VLAN_QOS"
//usage: "\n set_name_type NAME_TYPE" //usage: "\n set_name_type NAME_TYPE"
#include "libbb.h" #include "libbb.h"
#include <net/if.h> #include <net/if.h>

View File

@ -22,7 +22,7 @@
//usage: "[-n SEC] [-t] PROG ARGS" //usage: "[-n SEC] [-t] PROG ARGS"
//usage:#define watch_full_usage "\n\n" //usage:#define watch_full_usage "\n\n"
//usage: "Run PROG periodically\n" //usage: "Run PROG periodically\n"
//usage: "\n -n SEC Loop period (default 2)" //usage: "\n -n SEC Period (default 2)"
//usage: "\n -t Don't print header" //usage: "\n -t Don't print header"
//usage: //usage:
//usage:#define watch_example_usage //usage:#define watch_example_usage