aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-01-04 03:50:38 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-01-04 03:50:38 +0100
commit4e039bab375a273344b6c847daa04f13d8317c04 (patch)
treed649d25cca538e2b59e83d0ed00efb965091c5bd
parent3b053051c7c6f1e4776fce8a97d8f6a3c54f3f0e (diff)
downloadbusybox-w32-4e039bab375a273344b6c847daa04f13d8317c04.tar.gz
busybox-w32-4e039bab375a273344b6c847daa04f13d8317c04.tar.bz2
busybox-w32-4e039bab375a273344b6c847daa04f13d8317c04.zip
ash: improve --help
function old new delta packed_usage 33504 33499 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index e24b74c03..37f9dd71b 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -314,9 +314,12 @@ typedef long arith_t;
314 314
315/* ============ Shell options */ 315/* ============ Shell options */
316 316
317/* If you add/change options hare, update --help text too */
317static const char *const optletters_optnames[] = { 318static const char *const optletters_optnames[] = {
318 "e" "errexit", 319 "e" "errexit",
319 "f" "noglob", 320 "f" "noglob",
321/* bash has '-o ignoreeof', but no short synonym -I for it */
322/* (in bash, set -I disables invisible variables (what's that?)) */
320 "I" "ignoreeof", 323 "I" "ignoreeof",
321/* The below allowed this invocation: 324/* The below allowed this invocation:
322 * ash -c 'set -i; echo $-; sleep 5; echo $-' 325 * ash -c 'set -i; echo $-; sleep 5; echo $-'
@@ -325,9 +328,10 @@ static const char *const optletters_optnames[] = {
325 * In our code, this is denoted by empty long name: 328 * In our code, this is denoted by empty long name:
326 */ 329 */
327 "i" "", 330 "i" "",
331/* (removing "i" altogether would remove it from "$-", not good) */
328 "m" "monitor", 332 "m" "monitor",
329 "n" "noexec", 333 "n" "noexec",
330/* Ditto: bash has no "set -s" */ 334/* Ditto: bash has no "set -s", "set -c" */
331 "s" "", 335 "s" "",
332 "c" "", 336 "c" "",
333 "x" "xtrace", 337 "x" "xtrace",
@@ -14265,7 +14269,8 @@ init(void)
14265 14269
14266 14270
14267//usage:#define ash_trivial_usage 14271//usage:#define ash_trivial_usage
14268//usage: "[-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS] / -s [ARGS]]" 14272//usage: "[-il] [-/+Cabefmnuvx] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS] / -s [ARGS]]"
14273//////// comes from ^^^^^^^^^^optletters
14269//usage:#define ash_full_usage "\n\n" 14274//usage:#define ash_full_usage "\n\n"
14270//usage: "Unix shell interpreter" 14275//usage: "Unix shell interpreter"
14271 14276