diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-21 09:50:55 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-21 09:50:55 +0200 |
commit | 72089cf6b4a77214ec4fd21d5ee5bf56958781cb (patch) | |
tree | a5cd9d8f47e909834d3dbc44f895556e68bcf18f /shell | |
parent | 75d151e31d135ebab083307ded4e9b98970baa75 (diff) | |
download | busybox-w32-72089cf6b4a77214ec4fd21d5ee5bf56958781cb.tar.gz busybox-w32-72089cf6b4a77214ec4fd21d5ee5bf56958781cb.tar.bz2 busybox-w32-72089cf6b4a77214ec4fd21d5ee5bf56958781cb.zip |
config: deindent all help texts
Those two spaces after tab have no effect, and always a nuisance when editing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/Config.src | 124 | ||||
-rw-r--r-- | shell/ash.c | 50 | ||||
-rw-r--r-- | shell/cttyhack.c | 54 | ||||
-rw-r--r-- | shell/hush.c | 54 |
4 files changed, 141 insertions, 141 deletions
diff --git a/shell/Config.src b/shell/Config.src index 0dbf304ae..81c4ec874 100644 --- a/shell/Config.src +++ b/shell/Config.src | |||
@@ -10,26 +10,26 @@ choice | |||
10 | prompt "Choose which shell is aliased to 'sh' name" | 10 | prompt "Choose which shell is aliased to 'sh' name" |
11 | default SH_IS_ASH | 11 | default SH_IS_ASH |
12 | help | 12 | help |
13 | Choose which shell you want to be executed by 'sh' alias. | 13 | Choose which shell you want to be executed by 'sh' alias. |
14 | The ash shell is the most bash compatible and full featured one. | 14 | The ash shell is the most bash compatible and full featured one. |
15 | 15 | ||
16 | # note: cannot use "select ASH" here, it breaks "make allnoconfig" | 16 | # note: cannot use "select ASH" here, it breaks "make allnoconfig" |
17 | config SH_IS_ASH | 17 | config SH_IS_ASH |
18 | depends on !NOMMU | 18 | depends on !NOMMU |
19 | bool "ash" | 19 | bool "ash" |
20 | help | 20 | help |
21 | Choose ash to be the shell executed by 'sh' name. | 21 | Choose ash to be the shell executed by 'sh' name. |
22 | The ash code will be built into busybox. If you don't select | 22 | The ash code will be built into busybox. If you don't select |
23 | "ash" choice (CONFIG_ASH), this shell may only be invoked by | 23 | "ash" choice (CONFIG_ASH), this shell may only be invoked by |
24 | the name 'sh' (and not 'ash'). | 24 | the name 'sh' (and not 'ash'). |
25 | 25 | ||
26 | config SH_IS_HUSH | 26 | config SH_IS_HUSH |
27 | bool "hush" | 27 | bool "hush" |
28 | help | 28 | help |
29 | Choose hush to be the shell executed by 'sh' name. | 29 | Choose hush to be the shell executed by 'sh' name. |
30 | The hush code will be built into busybox. If you don't select | 30 | The hush code will be built into busybox. If you don't select |
31 | "hush" choice (CONFIG_HUSH), this shell may only be invoked by | 31 | "hush" choice (CONFIG_HUSH), this shell may only be invoked by |
32 | the name 'sh' (and not 'hush'). | 32 | the name 'sh' (and not 'hush'). |
33 | 33 | ||
34 | config SH_IS_NONE | 34 | config SH_IS_NONE |
35 | bool "none" | 35 | bool "none" |
@@ -40,36 +40,36 @@ choice | |||
40 | prompt "Choose which shell is aliased to 'bash' name" | 40 | prompt "Choose which shell is aliased to 'bash' name" |
41 | default BASH_IS_NONE | 41 | default BASH_IS_NONE |
42 | help | 42 | help |
43 | Choose which shell you want to be executed by 'bash' alias. | 43 | Choose which shell you want to be executed by 'bash' alias. |
44 | The ash shell is the most bash compatible and full featured one, | 44 | The ash shell is the most bash compatible and full featured one, |
45 | although compatibility is far from being complete. | 45 | although compatibility is far from being complete. |
46 | 46 | ||
47 | Note that selecting this option does not switch on any bash | 47 | Note that selecting this option does not switch on any bash |
48 | compatibility code. It merely makes it possible to install | 48 | compatibility code. It merely makes it possible to install |
49 | /bin/bash (sym)link and run scripts which start with | 49 | /bin/bash (sym)link and run scripts which start with |
50 | #!/bin/bash line. | 50 | #!/bin/bash line. |
51 | 51 | ||
52 | Many systems use it in scripts which use bash-specific features, | 52 | Many systems use it in scripts which use bash-specific features, |
53 | even simple ones like $RANDOM. Without this option, busybox | 53 | even simple ones like $RANDOM. Without this option, busybox |
54 | can't be used for running them because it won't recongnize | 54 | can't be used for running them because it won't recongnize |
55 | "bash" as a supported applet name. | 55 | "bash" as a supported applet name. |
56 | 56 | ||
57 | config BASH_IS_ASH | 57 | config BASH_IS_ASH |
58 | depends on !NOMMU | 58 | depends on !NOMMU |
59 | bool "ash" | 59 | bool "ash" |
60 | help | 60 | help |
61 | Choose ash to be the shell executed by 'bash' name. | 61 | Choose ash to be the shell executed by 'bash' name. |
62 | The ash code will be built into busybox. If you don't select | 62 | The ash code will be built into busybox. If you don't select |
63 | "ash" choice (CONFIG_ASH), this shell may only be invoked by | 63 | "ash" choice (CONFIG_ASH), this shell may only be invoked by |
64 | the name 'bash' (and not 'ash'). | 64 | the name 'bash' (and not 'ash'). |
65 | 65 | ||
66 | config BASH_IS_HUSH | 66 | config BASH_IS_HUSH |
67 | bool "hush" | 67 | bool "hush" |
68 | help | 68 | help |
69 | Choose hush to be the shell executed by 'bash' name. | 69 | Choose hush to be the shell executed by 'bash' name. |
70 | The hush code will be built into busybox. If you don't select | 70 | The hush code will be built into busybox. If you don't select |
71 | "hush" choice (CONFIG_HUSH), this shell may only be invoked by | 71 | "hush" choice (CONFIG_HUSH), this shell may only be invoked by |
72 | the name 'bash' (and not 'hush'). | 72 | the name 'bash' (and not 'hush'). |
73 | 73 | ||
74 | config BASH_IS_NONE | 74 | config BASH_IS_NONE |
75 | bool "none" | 75 | bool "none" |
@@ -88,78 +88,78 @@ config FEATURE_SH_MATH | |||
88 | default y | 88 | default y |
89 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 89 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
90 | help | 90 | help |
91 | Enable math support in the shell via $((...)) syntax. | 91 | Enable math support in the shell via $((...)) syntax. |
92 | 92 | ||
93 | config FEATURE_SH_MATH_64 | 93 | config FEATURE_SH_MATH_64 |
94 | bool "Extend POSIX math support to 64 bit" | 94 | bool "Extend POSIX math support to 64 bit" |
95 | default y | 95 | default y |
96 | depends on FEATURE_SH_MATH | 96 | depends on FEATURE_SH_MATH |
97 | help | 97 | help |
98 | Enable 64-bit math support in the shell. This will make the shell | 98 | Enable 64-bit math support in the shell. This will make the shell |
99 | slightly larger, but will allow computation with very large numbers. | 99 | slightly larger, but will allow computation with very large numbers. |
100 | This is not in POSIX, so do not rely on this in portable code. | 100 | This is not in POSIX, so do not rely on this in portable code. |
101 | 101 | ||
102 | config FEATURE_SH_EXTRA_QUIET | 102 | config FEATURE_SH_EXTRA_QUIET |
103 | bool "Hide message on interactive shell startup" | 103 | bool "Hide message on interactive shell startup" |
104 | default y | 104 | default y |
105 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 105 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
106 | help | 106 | help |
107 | Remove the busybox introduction when starting a shell. | 107 | Remove the busybox introduction when starting a shell. |
108 | 108 | ||
109 | config FEATURE_SH_STANDALONE | 109 | config FEATURE_SH_STANDALONE |
110 | bool "Standalone shell" | 110 | bool "Standalone shell" |
111 | default n | 111 | default n |
112 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 112 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
113 | help | 113 | help |
114 | This option causes busybox shells to use busybox applets | 114 | This option causes busybox shells to use busybox applets |
115 | in preference to executables in the PATH whenever possible. For | 115 | in preference to executables in the PATH whenever possible. For |
116 | example, entering the command 'ifconfig' into the shell would cause | 116 | example, entering the command 'ifconfig' into the shell would cause |
117 | busybox to use the ifconfig busybox applet. Specifying the fully | 117 | busybox to use the ifconfig busybox applet. Specifying the fully |
118 | qualified executable name, such as '/sbin/ifconfig' will still | 118 | qualified executable name, such as '/sbin/ifconfig' will still |
119 | execute the /sbin/ifconfig executable on the filesystem. This option | 119 | execute the /sbin/ifconfig executable on the filesystem. This option |
120 | is generally used when creating a statically linked version of busybox | 120 | is generally used when creating a statically linked version of busybox |
121 | for use as a rescue shell, in the event that you screw up your system. | 121 | for use as a rescue shell, in the event that you screw up your system. |
122 | 122 | ||
123 | This is implemented by re-execing /proc/self/exe (typically) | 123 | This is implemented by re-execing /proc/self/exe (typically) |
124 | with right parameters. | 124 | with right parameters. |
125 | 125 | ||
126 | However, there are drawbacks: it is problematic in chroot jails | 126 | However, there are drawbacks: it is problematic in chroot jails |
127 | without mounted /proc, and ps/top may show command name as 'exe' | 127 | without mounted /proc, and ps/top may show command name as 'exe' |
128 | for applets started this way. | 128 | for applets started this way. |
129 | 129 | ||
130 | config FEATURE_SH_NOFORK | 130 | config FEATURE_SH_NOFORK |
131 | bool "Run 'nofork' applets directly" | 131 | bool "Run 'nofork' applets directly" |
132 | default n | 132 | default n |
133 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 133 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
134 | help | 134 | help |
135 | This option causes busybox shells to not execute typical | 135 | This option causes busybox shells to not execute typical |
136 | fork/exec/wait sequence, but call <applet>_main directly, | 136 | fork/exec/wait sequence, but call <applet>_main directly, |
137 | if possible. (Sometimes it is not possible: for example, | 137 | if possible. (Sometimes it is not possible: for example, |
138 | this is not possible in pipes). | 138 | this is not possible in pipes). |
139 | 139 | ||
140 | This will be done only for some applets (those which are marked | 140 | This will be done only for some applets (those which are marked |
141 | NOFORK in include/applets.h). | 141 | NOFORK in include/applets.h). |
142 | 142 | ||
143 | This may significantly speed up some shell scripts. | 143 | This may significantly speed up some shell scripts. |
144 | 144 | ||
145 | This feature is relatively new. Use with care. Report bugs | 145 | This feature is relatively new. Use with care. Report bugs |
146 | to project mailing list. | 146 | to project mailing list. |
147 | 147 | ||
148 | config FEATURE_SH_READ_FRAC | 148 | config FEATURE_SH_READ_FRAC |
149 | bool "read -t N.NNN support (+110 bytes)" | 149 | bool "read -t N.NNN support (+110 bytes)" |
150 | default y | 150 | default y |
151 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 151 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
152 | help | 152 | help |
153 | Enable support for fractional second timeout in read builtin. | 153 | Enable support for fractional second timeout in read builtin. |
154 | 154 | ||
155 | config FEATURE_SH_HISTFILESIZE | 155 | config FEATURE_SH_HISTFILESIZE |
156 | bool "Use $HISTFILESIZE" | 156 | bool "Use $HISTFILESIZE" |
157 | default y | 157 | default y |
158 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH | 158 | depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH |
159 | help | 159 | help |
160 | This option makes busybox shells to use $HISTFILESIZE variable | 160 | This option makes busybox shells to use $HISTFILESIZE variable |
161 | to set shell history size. Note that its max value is capped | 161 | to set shell history size. Note that its max value is capped |
162 | by "History size" setting in library tuning section. | 162 | by "History size" setting in library tuning section. |
163 | 163 | ||
164 | endif # Options common to all shells | 164 | endif # Options common to all shells |
165 | 165 | ||
diff --git a/shell/ash.c b/shell/ash.c index 9d81f4ba8..b28731eb1 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -20,10 +20,10 @@ | |||
20 | //config: default y | 20 | //config: default y |
21 | //config: depends on !NOMMU | 21 | //config: depends on !NOMMU |
22 | //config: help | 22 | //config: help |
23 | //config: The most complete and most pedantically correct shell included with | 23 | //config: The most complete and most pedantically correct shell included with |
24 | //config: busybox. This shell is actually a derivative of the Debian 'dash' | 24 | //config: busybox. This shell is actually a derivative of the Debian 'dash' |
25 | //config: shell (by Herbert Xu), which was created by porting the 'ash' shell | 25 | //config: shell (by Herbert Xu), which was created by porting the 'ash' shell |
26 | //config: (written by Kenneth Almquist) from NetBSD. | 26 | //config: (written by Kenneth Almquist) from NetBSD. |
27 | //config: | 27 | //config: |
28 | //config:# ash options | 28 | //config:# ash options |
29 | //config:# note: Don't remove !NOMMU part in the next line; it would break | 29 | //config:# note: Don't remove !NOMMU part in the next line; it would break |
@@ -40,11 +40,11 @@ | |||
40 | //config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now | 40 | //config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now |
41 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 41 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
42 | //config: help | 42 | //config: help |
43 | //config: Do not use glob() function from libc, use internal implementation. | 43 | //config: Do not use glob() function from libc, use internal implementation. |
44 | //config: Use this if you are getting "glob.h: No such file or directory" | 44 | //config: Use this if you are getting "glob.h: No such file or directory" |
45 | //config: or similar build errors. | 45 | //config: or similar build errors. |
46 | //config: Note that as of now (2017-01), uclibc and musl glob() both have bugs | 46 | //config: Note that as of now (2017-01), uclibc and musl glob() both have bugs |
47 | //config: which would break ash if you select N here. | 47 | //config: which would break ash if you select N here. |
48 | //config: | 48 | //config: |
49 | //config:config ASH_BASH_COMPAT | 49 | //config:config ASH_BASH_COMPAT |
50 | //config: bool "bash-compatible extensions" | 50 | //config: bool "bash-compatible extensions" |
@@ -66,37 +66,37 @@ | |||
66 | //config: default y | 66 | //config: default y |
67 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 67 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
68 | //config: help | 68 | //config: help |
69 | //config: Enable pseudorandom generator and dynamic variable "$RANDOM". | 69 | //config: Enable pseudorandom generator and dynamic variable "$RANDOM". |
70 | //config: Each read of "$RANDOM" will generate a new pseudorandom value. | 70 | //config: Each read of "$RANDOM" will generate a new pseudorandom value. |
71 | //config: You can reset the generator by using a specified start value. | 71 | //config: You can reset the generator by using a specified start value. |
72 | //config: After "unset RANDOM" the generator will switch off and this | 72 | //config: After "unset RANDOM" the generator will switch off and this |
73 | //config: variable will no longer have special treatment. | 73 | //config: variable will no longer have special treatment. |
74 | //config: | 74 | //config: |
75 | //config:config ASH_EXPAND_PRMT | 75 | //config:config ASH_EXPAND_PRMT |
76 | //config: bool "Expand prompt string" | 76 | //config: bool "Expand prompt string" |
77 | //config: default y | 77 | //config: default y |
78 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 78 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
79 | //config: help | 79 | //config: help |
80 | //config: $PS# may contain volatile content, such as backquote commands. | 80 | //config: $PS# may contain volatile content, such as backquote commands. |
81 | //config: This option recreates the prompt string from the environment | 81 | //config: This option recreates the prompt string from the environment |
82 | //config: variable each time it is displayed. | 82 | //config: variable each time it is displayed. |
83 | //config: | 83 | //config: |
84 | //config:config ASH_IDLE_TIMEOUT | 84 | //config:config ASH_IDLE_TIMEOUT |
85 | //config: bool "Idle timeout variable $TMOUT" | 85 | //config: bool "Idle timeout variable $TMOUT" |
86 | //config: default y | 86 | //config: default y |
87 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 87 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
88 | //config: help | 88 | //config: help |
89 | //config: Enable bash-like auto-logout after $TMOUT seconds of idle time. | 89 | //config: Enable bash-like auto-logout after $TMOUT seconds of idle time. |
90 | //config: | 90 | //config: |
91 | //config:config ASH_MAIL | 91 | //config:config ASH_MAIL |
92 | //config: bool "Check for new mail in interactive shell" | 92 | //config: bool "Check for new mail in interactive shell" |
93 | //config: default y | 93 | //config: default y |
94 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 94 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
95 | //config: help | 95 | //config: help |
96 | //config: Enable "check for new mail" function: | 96 | //config: Enable "check for new mail" function: |
97 | //config: if set, $MAIL file and $MAILPATH list of files | 97 | //config: if set, $MAIL file and $MAILPATH list of files |
98 | //config: are checked for mtime changes, and "you have mail" | 98 | //config: are checked for mtime changes, and "you have mail" |
99 | //config: message is printed if change is detected. | 99 | //config: message is printed if change is detected. |
100 | //config: | 100 | //config: |
101 | //config:config ASH_ECHO | 101 | //config:config ASH_ECHO |
102 | //config: bool "echo builtin" | 102 | //config: bool "echo builtin" |
@@ -128,9 +128,9 @@ | |||
128 | //config: default y | 128 | //config: default y |
129 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH | 129 | //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH |
130 | //config: help | 130 | //config: help |
131 | //config: Enable support for the 'command' builtin, which allows | 131 | //config: Enable support for the 'command' builtin, which allows |
132 | //config: you to run the specified command or builtin, | 132 | //config: you to run the specified command or builtin, |
133 | //config: even when there is a function with the same name. | 133 | //config: even when there is a function with the same name. |
134 | //config: | 134 | //config: |
135 | //config:endif # ash options | 135 | //config:endif # ash options |
136 | 136 | ||
diff --git a/shell/cttyhack.c b/shell/cttyhack.c index 9a5f4bb52..9004b4763 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c | |||
@@ -14,45 +14,45 @@ | |||
14 | //config: bool "cttyhack (2.5 kb)" | 14 | //config: bool "cttyhack (2.5 kb)" |
15 | //config: default y | 15 | //config: default y |
16 | //config: help | 16 | //config: help |
17 | //config: One common problem reported on the mailing list is the "can't | 17 | //config: One common problem reported on the mailing list is the "can't |
18 | //config: access tty; job control turned off" error message, which typically | 18 | //config: access tty; job control turned off" error message, which typically |
19 | //config: appears when one tries to use a shell with stdin/stdout on | 19 | //config: appears when one tries to use a shell with stdin/stdout on |
20 | //config: /dev/console. | 20 | //config: /dev/console. |
21 | //config: This device is special - it cannot be a controlling tty. | 21 | //config: This device is special - it cannot be a controlling tty. |
22 | //config: | 22 | //config: |
23 | //config: The proper solution is to use the correct device instead of | 23 | //config: The proper solution is to use the correct device instead of |
24 | //config: /dev/console. | 24 | //config: /dev/console. |
25 | //config: | 25 | //config: |
26 | //config: cttyhack provides a "quick and dirty" solution to this problem. | 26 | //config: cttyhack provides a "quick and dirty" solution to this problem. |
27 | //config: It analyzes stdin with various ioctls, trying to determine whether | 27 | //config: It analyzes stdin with various ioctls, trying to determine whether |
28 | //config: it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). | 28 | //config: it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). |
29 | //config: On Linux it also checks sysfs for a pointer to the active console. | 29 | //config: On Linux it also checks sysfs for a pointer to the active console. |
30 | //config: If cttyhack is able to find the real console device, it closes | 30 | //config: If cttyhack is able to find the real console device, it closes |
31 | //config: stdin/out/err and reopens that device. | 31 | //config: stdin/out/err and reopens that device. |
32 | //config: Then it executes the given program. Opening the device will make | 32 | //config: Then it executes the given program. Opening the device will make |
33 | //config: that device a controlling tty. This may require cttyhack | 33 | //config: that device a controlling tty. This may require cttyhack |
34 | //config: to be a session leader. | 34 | //config: to be a session leader. |
35 | //config: | 35 | //config: |
36 | //config: Example for /etc/inittab (for busybox init): | 36 | //config: Example for /etc/inittab (for busybox init): |
37 | //config: | 37 | //config: |
38 | //config: ::respawn:/bin/cttyhack /bin/sh | 38 | //config: ::respawn:/bin/cttyhack /bin/sh |
39 | //config: | 39 | //config: |
40 | //config: Starting an interactive shell from boot shell script: | 40 | //config: Starting an interactive shell from boot shell script: |
41 | //config: | 41 | //config: |
42 | //config: setsid cttyhack sh | 42 | //config: setsid cttyhack sh |
43 | //config: | 43 | //config: |
44 | //config: Giving controlling tty to shell running with PID 1: | 44 | //config: Giving controlling tty to shell running with PID 1: |
45 | //config: | 45 | //config: |
46 | //config: # exec cttyhack sh | 46 | //config: # exec cttyhack sh |
47 | //config: | 47 | //config: |
48 | //config: Without cttyhack, you need to know exact tty name, | 48 | //config: Without cttyhack, you need to know exact tty name, |
49 | //config: and do something like this: | 49 | //config: and do something like this: |
50 | //config: | 50 | //config: |
51 | //config: # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' | 51 | //config: # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' |
52 | //config: | 52 | //config: |
53 | //config: Starting getty on a controlling tty from a shell script: | 53 | //config: Starting getty on a controlling tty from a shell script: |
54 | //config: | 54 | //config: |
55 | //config: # getty 115200 $(cttyhack) | 55 | //config: # getty 115200 $(cttyhack) |
56 | 56 | ||
57 | //usage:#define cttyhack_trivial_usage | 57 | //usage:#define cttyhack_trivial_usage |
58 | //usage: "[PROG ARGS]" | 58 | //usage: "[PROG ARGS]" |
diff --git a/shell/hush.c b/shell/hush.c index 4f1f81f31..170d5f33b 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -104,15 +104,15 @@ | |||
104 | //config: bool "hush (64 kb)" | 104 | //config: bool "hush (64 kb)" |
105 | //config: default y | 105 | //config: default y |
106 | //config: help | 106 | //config: help |
107 | //config: hush is a small shell. It handles the normal flow control | 107 | //config: hush is a small shell. It handles the normal flow control |
108 | //config: constructs such as if/then/elif/else/fi, for/in/do/done, while loops, | 108 | //config: constructs such as if/then/elif/else/fi, for/in/do/done, while loops, |
109 | //config: case/esac. Redirections, here documents, $((arithmetic)) | 109 | //config: case/esac. Redirections, here documents, $((arithmetic)) |
110 | //config: and functions are supported. | 110 | //config: and functions are supported. |
111 | //config: | 111 | //config: |
112 | //config: It will compile and work on no-mmu systems. | 112 | //config: It will compile and work on no-mmu systems. |
113 | //config: | 113 | //config: |
114 | //config: It does not handle select, aliases, tilde expansion, | 114 | //config: It does not handle select, aliases, tilde expansion, |
115 | //config: &>file and >&file redirection of stdout+stderr. | 115 | //config: &>file and >&file redirection of stdout+stderr. |
116 | //config: | 116 | //config: |
117 | //config:config HUSH_BASH_COMPAT | 117 | //config:config HUSH_BASH_COMPAT |
118 | //config: bool "bash-compatible extensions" | 118 | //config: bool "bash-compatible extensions" |
@@ -124,17 +124,17 @@ | |||
124 | //config: default y | 124 | //config: default y |
125 | //config: depends on HUSH_BASH_COMPAT | 125 | //config: depends on HUSH_BASH_COMPAT |
126 | //config: help | 126 | //config: help |
127 | //config: Enable {abc,def} extension. | 127 | //config: Enable {abc,def} extension. |
128 | //config: | 128 | //config: |
129 | //config:config HUSH_INTERACTIVE | 129 | //config:config HUSH_INTERACTIVE |
130 | //config: bool "Interactive mode" | 130 | //config: bool "Interactive mode" |
131 | //config: default y | 131 | //config: default y |
132 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 132 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
133 | //config: help | 133 | //config: help |
134 | //config: Enable interactive mode (prompt and command editing). | 134 | //config: Enable interactive mode (prompt and command editing). |
135 | //config: Without this, hush simply reads and executes commands | 135 | //config: Without this, hush simply reads and executes commands |
136 | //config: from stdin just like a shell script from a file. | 136 | //config: from stdin just like a shell script from a file. |
137 | //config: No prompt, no PS1/PS2 magic shell variables. | 137 | //config: No prompt, no PS1/PS2 magic shell variables. |
138 | //config: | 138 | //config: |
139 | //config:config HUSH_SAVEHISTORY | 139 | //config:config HUSH_SAVEHISTORY |
140 | //config: bool "Save command history to .hush_history" | 140 | //config: bool "Save command history to .hush_history" |
@@ -146,18 +146,18 @@ | |||
146 | //config: default y | 146 | //config: default y |
147 | //config: depends on HUSH_INTERACTIVE | 147 | //config: depends on HUSH_INTERACTIVE |
148 | //config: help | 148 | //config: help |
149 | //config: Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current | 149 | //config: Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current |
150 | //config: command (not entire shell), fg/bg builtins work. Without this option, | 150 | //config: command (not entire shell), fg/bg builtins work. Without this option, |
151 | //config: "cmd &" still works by simply spawning a process and immediately | 151 | //config: "cmd &" still works by simply spawning a process and immediately |
152 | //config: prompting for next command (or executing next command in a script), | 152 | //config: prompting for next command (or executing next command in a script), |
153 | //config: but no separate process group is formed. | 153 | //config: but no separate process group is formed. |
154 | //config: | 154 | //config: |
155 | //config:config HUSH_TICK | 155 | //config:config HUSH_TICK |
156 | //config: bool "Support process substitution" | 156 | //config: bool "Support process substitution" |
157 | //config: default y | 157 | //config: default y |
158 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 158 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
159 | //config: help | 159 | //config: help |
160 | //config: Enable `command` and $(command). | 160 | //config: Enable `command` and $(command). |
161 | //config: | 161 | //config: |
162 | //config:config HUSH_IF | 162 | //config:config HUSH_IF |
163 | //config: bool "Support if/then/elif/else/fi" | 163 | //config: bool "Support if/then/elif/else/fi" |
@@ -174,37 +174,37 @@ | |||
174 | //config: default y | 174 | //config: default y |
175 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 175 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
176 | //config: help | 176 | //config: help |
177 | //config: Enable case ... esac statement. +400 bytes. | 177 | //config: Enable case ... esac statement. +400 bytes. |
178 | //config: | 178 | //config: |
179 | //config:config HUSH_FUNCTIONS | 179 | //config:config HUSH_FUNCTIONS |
180 | //config: bool "Support funcname() { commands; } syntax" | 180 | //config: bool "Support funcname() { commands; } syntax" |
181 | //config: default y | 181 | //config: default y |
182 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 182 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
183 | //config: help | 183 | //config: help |
184 | //config: Enable support for shell functions. +800 bytes. | 184 | //config: Enable support for shell functions. +800 bytes. |
185 | //config: | 185 | //config: |
186 | //config:config HUSH_LOCAL | 186 | //config:config HUSH_LOCAL |
187 | //config: bool "local builtin" | 187 | //config: bool "local builtin" |
188 | //config: default y | 188 | //config: default y |
189 | //config: depends on HUSH_FUNCTIONS | 189 | //config: depends on HUSH_FUNCTIONS |
190 | //config: help | 190 | //config: help |
191 | //config: Enable support for local variables in functions. | 191 | //config: Enable support for local variables in functions. |
192 | //config: | 192 | //config: |
193 | //config:config HUSH_RANDOM_SUPPORT | 193 | //config:config HUSH_RANDOM_SUPPORT |
194 | //config: bool "Pseudorandom generator and $RANDOM variable" | 194 | //config: bool "Pseudorandom generator and $RANDOM variable" |
195 | //config: default y | 195 | //config: default y |
196 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 196 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
197 | //config: help | 197 | //config: help |
198 | //config: Enable pseudorandom generator and dynamic variable "$RANDOM". | 198 | //config: Enable pseudorandom generator and dynamic variable "$RANDOM". |
199 | //config: Each read of "$RANDOM" will generate a new pseudorandom value. | 199 | //config: Each read of "$RANDOM" will generate a new pseudorandom value. |
200 | //config: | 200 | //config: |
201 | //config:config HUSH_MODE_X | 201 | //config:config HUSH_MODE_X |
202 | //config: bool "Support 'hush -x' option and 'set -x' command" | 202 | //config: bool "Support 'hush -x' option and 'set -x' command" |
203 | //config: default y | 203 | //config: default y |
204 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 204 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
205 | //config: help | 205 | //config: help |
206 | //config: This instructs hush to print commands before execution. | 206 | //config: This instructs hush to print commands before execution. |
207 | //config: Adds ~300 bytes. | 207 | //config: Adds ~300 bytes. |
208 | //config: | 208 | //config: |
209 | //config:config HUSH_ECHO | 209 | //config:config HUSH_ECHO |
210 | //config: bool "echo builtin" | 210 | //config: bool "echo builtin" |
@@ -236,14 +236,14 @@ | |||
236 | //config: default y | 236 | //config: default y |
237 | //config: depends on HUSH_EXPORT | 237 | //config: depends on HUSH_EXPORT |
238 | //config: help | 238 | //config: help |
239 | //config: export -n unexports variables. It is a bash extension. | 239 | //config: export -n unexports variables. It is a bash extension. |
240 | //config: | 240 | //config: |
241 | //config:config HUSH_READONLY | 241 | //config:config HUSH_READONLY |
242 | //config: bool "readonly builtin" | 242 | //config: bool "readonly builtin" |
243 | //config: default y | 243 | //config: default y |
244 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH | 244 | //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH |
245 | //config: help | 245 | //config: help |
246 | //config: Enable support for read-only variables. | 246 | //config: Enable support for read-only variables. |
247 | //config: | 247 | //config: |
248 | //config:config HUSH_KILL | 248 | //config:config HUSH_KILL |
249 | //config: bool "kill builtin (supports kill %jobspec)" | 249 | //config: bool "kill builtin (supports kill %jobspec)" |