aboutsummaryrefslogtreecommitdiff
path: root/shell
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 /shell
parent3b053051c7c6f1e4776fce8a97d8f6a3c54f3f0e (diff)
downloadbusybox-4e039bab375a273344b6c847daa04f13d8317c04.tar.gz
ash: improve --help
function old new delta packed_usage 33504 33499 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-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;
/* ============ Shell options */
+/* If you add/change options hare, update --help text too */
static const char *const optletters_optnames[] = {
"e" "errexit",
"f" "noglob",
+/* bash has '-o ignoreeof', but no short synonym -I for it */
+/* (in bash, set -I disables invisible variables (what's that?)) */
"I" "ignoreeof",
/* The below allowed this invocation:
* ash -c 'set -i; echo $-; sleep 5; echo $-'
@@ -325,9 +328,10 @@ static const char *const optletters_optnames[] = {
* In our code, this is denoted by empty long name:
*/
"i" "",
+/* (removing "i" altogether would remove it from "$-", not good) */
"m" "monitor",
"n" "noexec",
-/* Ditto: bash has no "set -s" */
+/* Ditto: bash has no "set -s", "set -c" */
"s" "",
"c" "",
"x" "xtrace",
@@ -14265,7 +14269,8 @@ init(void)
//usage:#define ash_trivial_usage
-//usage: "[-/+OPTIONS] [-/+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"