aboutsummaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * ash: suppress readonly1.tests false positive; add readonly0.testsDenys Vlasenko2017-07-214-4/+62
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: improve set -x to quote strings as necessaryDenys Vlasenko2017-07-213-11/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basen on the patch from Martijn Dekker <martijn@inlv.org> function old new delta evalcommand 1161 1302 +141 maybe_single_quote - 60 +60 getoptscmd 527 546 +19 readtoken1 2819 2823 +4 localcmd 366 364 -2 evaltreenr 495 479 -16 evaltree 495 479 -16 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/3 up/down: 224/-34) Total: 190 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: deindent all help textsDenys Vlasenko2017-07-214-141/+141
| | | | | | | | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: optional support for read -t N.NNN, closes 10101Denys Vlasenko2017-07-206-30/+93
| | | | | | | | | | | | | | | | function old new delta shell_builtin_read 1097 1277 +180 dump_procs 353 359 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: remove contradicting size info in config helpDenys Vlasenko2017-07-181-2/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: remove contradicting size info in config helpDenys Vlasenko2017-07-181-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-183-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: tweak "help" outputDenys Vlasenko2017-07-181-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: allow for filename extension in find_commandRon Yorston2017-07-241-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When searching for a command specified as a pathname also check for the filename with a '.exe' or '.com' extension. Previously even if /bin/busybox.exe was present we got: $ command -v /bin/busybox $ echo $? 127 This now becomes: $ command -v /bin/busybox /bin/busybox $ echo $? 0
* | Merge branch 'busybox' into mergeRon Yorston2017-07-1875-501/+1305
|\|
| * hush: fix readonly2.tests failureDenys Vlasenko2017-07-183-0/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: another testcase for "READONLY_VAR=VAL BLTIN ..."Denys Vlasenko2017-07-184-5/+27
| | | | | | | | | | | | Currently fails. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: do not assign to readonly VAR in "VAR=VAL CMD" syntax tooDenys Vlasenko2017-07-183-12/+33
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add readonly testcase, fix falloutDenys Vlasenko2017-07-183-9/+53
| | | | | | | | | | | | | | | | | | | | function old new delta helper_export_local 185 214 +29 run_pipe 1549 1560 +11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 40/0) Total: 40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: convert exp/ro/local parameters to bitfields in one flag paramDenys Vlasenko2017-07-181-46/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta helper_export_local 174 185 +11 set_local_var 424 420 -4 run_list 1048 1044 -4 set_vars_and_save_old 88 83 -5 set_local_var_from_halves 27 22 -5 run_pipe 1554 1549 -5 builtin_export 173 168 -5 set_pwd_var 40 34 -6 builtin_readonly 70 64 -6 expand_one_var 1625 1618 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/9 up/down: 11/-47) Total: -36 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: HUSH_READONLY depends on HUSHDenys Vlasenko2017-07-171-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: forgot to emit error on (failing) second "readonly VAR=VAL"Denys Vlasenko2017-07-171-3/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: smaller code in !READONLY configsDenys Vlasenko2017-07-171-4/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: implement "readonly" builtinDenys Vlasenko2017-07-171-36/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta builtin_readonly - 70 +70 helper_export_local 152 174 +22 bltins1 348 360 +12 expand_one_var 1620 1625 +5 builtin_export 168 173 +5 set_pwd_var 36 40 +4 set_local_var 410 414 +4 set_vars_and_save_old 85 88 +3 set_local_var_from_halves 24 27 +3 run_pipe 1551 1554 +3 run_list 1046 1048 +2 builtin_type 116 114 -2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 10/1 up/down: 133/-2) Total: 131 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: more general format ${var:EXPR:EXPR}Denys Vlasenko2017-07-173-17/+73
| | | | | | | | | | | | | | | | function old new delta subevalvar 1171 1202 +31 localcmd 364 366 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: "you disabled math" is wrong: user did not disable it, builder of ash didDenys Vlasenko2017-07-171-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: small fix to last commitDenys Vlasenko2017-07-171-1/+1
| | | | | | | | | | | | die_if_script() indeed dies only in scripts! Must handle the case where it continues. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: support ${VAR:N:-M}Denys Vlasenko2017-07-173-23/+72
| | | | | | | | | | | | | | | | function old new delta expand_one_var 1602 1615 +13 builtin_type 114 116 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shells: expand TODO comments, no code changesDenys Vlasenko2017-07-172-5/+27
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix "cmd1 && cmd2 &" handling on NOMMUDenys Vlasenko2017-07-161-9/+13
| | | | | | | | | | | | | | function old new delta done_pipe 234 238 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: and_or_and_backgrounding.tests is no longer "UNFIXED BUG"Denys Vlasenko2017-07-152-2/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix and_or_and_backgrounding.tests failureDenys Vlasenko2017-07-155-1/+71
| | | | | | | | | | | | | | function old new delta done_pipe 133 218 +85 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: protect WIFSTOPPED use with #if JOBSJohannes Schindelin2017-07-151-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes the build in setups where there are no headers defining WIFSTOPPED and WSTOPSIG (where JOBS has to be set to 0). This partially reverts 4700fb5be (ash: make dowait() a bit more readable. Logic is unchanged, 2015-10-09). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: make "wait %1" work even if the job is deadDenys Vlasenko2017-07-141-39/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example script: sleep 1 | (sleep 1;exit 3) & sleep 2 echo Zero:$? wait %1 echo Three:$? function old new delta clean_up_last_dead_job - 24 +24 process_wait_result 426 447 +21 builtin_wait 285 293 +8 insert_job_into_table 264 269 +5 builtin_jobs 68 73 +5 remove_job_from_table 59 57 -2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/1 up/down: 63/-2) Total: 61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: remove superfluous comparisonDenys Vlasenko2017-07-141-1/+1
| | | | | | | | | | | | | | function old new delta builtin_wait 291 285 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add support for "set -e"Denys Vlasenko2017-07-147-21/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_list 978 1046 +68 o_opt_strings 24 32 +8 reset_traps_to_defaults 136 142 +6 pick_sighandler 57 60 +3 packed_usage 31772 31770 -2 hush_main 983 961 -22 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/2 up/down: 85/-24) Total: 61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add TODO for "set -e"Denys Vlasenko2017-07-101-0/+17
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: simplify insert_job_into_table() a bitDenys Vlasenko2017-07-101-15/+12
| | | | | | | | | | | | | | | | | | | | function old new delta done_word 767 761 -6 insert_job_into_table 325 264 -61 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 59/-126) Total: -67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: rename a few functionsDenys Vlasenko2017-07-101-10/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: explain why wait5.tests is failingDenys Vlasenko2017-07-081-0/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix "(sleep 1; exit 3) & sleep 2; echo $?; wait $!; echo $?"Denys Vlasenko2017-07-075-5/+26
| | | | | | | | | | | | | | | | | | | | | | function old new delta process_wait_result 414 426 +12 builtin_wait 283 291 +8 run_list 974 978 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 24/0) Total: 24 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix two redirection testcase failuresDenys Vlasenko2017-07-073-68/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta save_fds_on_redirect 183 256 +73 fcntl_F_DUPFD - 46 +46 restore_redirects 74 96 +22 xdup_and_close 51 72 +21 setup_redirects 196 200 +4 hush_main 988 983 -5 static.C 12 - -12 run_pipe 1595 1551 -44 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 4/2 up/down: 166/-61) Total: 105 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * main: fix the case where user has "halt" as login shell. Closes 9986Denys Vlasenko2017-07-072-2/+2
| | | | | | | | | | | | | | | | | | | | halt::0:0::/:/sbin/halt function old new delta run_applet_and_exit 748 751 +3 run_applet_no_and_exit 467 459 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: sync redir/* testsDenys Vlasenko2017-07-064-0/+22
| | | | | | | | | | | | Note: hush-redir/redir_to_bad_fd.tests currently fails Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: rename redir5.tests (hush has redir5.tests which is different)Denys Vlasenko2017-07-063-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add a TODO about redir3.tests failureDenys Vlasenko2017-07-063-0/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: rename hush-redir/redir3.tests (ash has redir3.tests which id different)Denys Vlasenko2017-07-062-0/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: Print error messages on shift -1Denys Vlasenko2017-07-064-2/+33
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixDenys Vlasenko2017-07-062-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: implement negative start in the ${v: -n[:m]} idiomDenys Vlasenko2017-07-065-2/+37
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: "adopt" ash var-utf8-length.testsDenys Vlasenko2017-07-063-0/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: "adopt" ash signal4.testsDenys Vlasenko2017-07-063-1/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: remove duplicate sigint1.tests (another copies are in signals/)Denys Vlasenko2017-07-064-84/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add tickquote1.tests from ash testsuiteDenys Vlasenko2017-07-063-1/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: syncronize ash and hush heredoc3.testsDenys Vlasenko2017-07-064-10/+31
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>