aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-01-12 17:21:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2022-01-12 17:21:14 +0100
commit004cefa918483513a9eca13e7701c74dff160e95 (patch)
tree52d70863de1c9f180c88368b555daf7263e56c6a /shell
parent524fecf7c3496e25cca235506b2a3328cee63de8 (diff)
downloadbusybox-w32-004cefa918483513a9eca13e7701c74dff160e95.tar.gz
busybox-w32-004cefa918483513a9eca13e7701c74dff160e95.tar.bz2
busybox-w32-004cefa918483513a9eca13e7701c74dff160e95.zip
reset: better --help text
function old new delta packed_usage 34175 34233 +58 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 4a8ec0c03..4c5dd1298 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11358,7 +11358,7 @@ options(int *login_sh)
11358 int val; 11358 int val;
11359 int c; 11359 int c;
11360 11360
11361 if (login_sh) 11361 if (login_sh != NULL) /* if we came from startup code */
11362 minusc = NULL; 11362 minusc = NULL;
11363 while ((p = *argptr) != NULL) { 11363 while ((p = *argptr) != NULL) {
11364 c = *p++; 11364 c = *p++;
@@ -11369,7 +11369,7 @@ options(int *login_sh)
11369 if (c == '-') { 11369 if (c == '-') {
11370 val = 1; 11370 val = 1;
11371 if (p[0] == '\0' || LONE_DASH(p)) { 11371 if (p[0] == '\0' || LONE_DASH(p)) {
11372 if (!login_sh) { 11372 if (login_sh == NULL) { /* we came from setcmd() */
11373 /* "-" means turn off -x and -v */ 11373 /* "-" means turn off -x and -v */
11374 if (p[0] == '\0') 11374 if (p[0] == '\0')
11375 xflag = vflag = 0; 11375 xflag = vflag = 0;
@@ -11382,7 +11382,7 @@ options(int *login_sh)
11382 } 11382 }
11383 /* first char was + or - */ 11383 /* first char was + or - */
11384 while ((c = *p++) != '\0') { 11384 while ((c = *p++) != '\0') {
11385 if (login_sh) { 11385 if (login_sh != NULL) { /* if we came from startup code */
11386 /* bash 3.2 indeed handles -c CMD and +c CMD the same */ 11386 /* bash 3.2 indeed handles -c CMD and +c CMD the same */
11387 if (c == 'c') { 11387 if (c == 'c') {
11388 minusc = p; /* command is after shell args */ 11388 minusc = p; /* command is after shell args */
@@ -11406,6 +11406,9 @@ options(int *login_sh)
11406 if (strcmp(p, "login") == 0) { 11406 if (strcmp(p, "login") == 0) {
11407 *login_sh = 1; 11407 *login_sh = 1;
11408 } 11408 }
11409/* TODO: --noprofile: e.g. if I want to run emergency shell from sulogin,
11410 * I want minimal/no shell init scripts - but it insists on running it as "-ash"...
11411 */
11409 break; 11412 break;
11410 } 11413 }
11411 } 11414 }