aboutsummaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2010-05-22hush: support ${var:EXPR:EXPR}!Denys Vlasenko
function old new delta handle_dollar 574 681 +107 expand_and_evaluate_arith - 77 +77 expand_vars_to_list 2302 2374 +72 add_till_closing_bracket 359 368 +9 builtin_exit 48 47 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 265/-1) Total: 264 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-22hush: fix a nommu todo in recent commitsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-22hush: fix more obscure ${var%...} casesDenys Vlasenko
function old new delta add_till_closing_paren 313 359 +46 builtin_exit 48 47 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: fix a=abc; c=c; echo ${a%${c}}Denys Vlasenko
function old new delta expand_vars_to_list 2229 2302 +73 add_till_closing_paren 286 313 +27 handle_dollar 623 574 -49 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 100/-49) Total: 51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: handle expansions in ${var?expanded_word} constructsDenys Vlasenko
function old new delta expand_vars_to_list 2209 2229 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: reorganized TODO comment at topDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: add a list of unsupported builtinsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: handle ${var:NUM:} tooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: remove extra comparison from prev commitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21hush: optional support for ${var:N:M} bashismDenys Vlasenko
function old new delta expand_vars_to_list 1999 2183 +184 handle_dollar 682 623 -59 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: explain various parameter expansion ops in commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: small code shrinkDenys Vlasenko
function old new delta expand_vars_to_list 2012 1999 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: shrink variable expansion codeDenys Vlasenko
function old new delta expand_vars_to_list 2164 2012 -152 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: fix var=`exit 2` not setting $? to 2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20update shell/READMEDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20ash: eliminate 16 bytes in bssDenys Vlasenko
text data bss dec hexfilename 841423 441 7572 849436 cf61cbusybox_old 841430 441 7556 849427 cf613busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: code shrinkDenys Vlasenko
text data bss dec hex filename 843121 453 6828 850402 cf9e2 busybox_old 843108 453 6828 850389 cf9d5 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20hush: support "cd -- DIR" and suchDenys Vlasenko
function old new delta skip_dash_dash - 33 +33 builtin_exit 43 48 +5 builtin_umask 121 125 +4 builtin_shift 115 119 +4 builtin_cd 71 75 +4 builtin_wait 271 274 +3 builtin_source 171 174 +3 builtin_exec 57 60 +3 builtin_eval 46 45 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/1 up/down: 59/-1) Total: 58 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20shell: make it possible to alias one of shells to "bash"Denys Vlasenko
function old new delta packed_usage 27047 27054 +7 applet_names 2227 2232 +5 applet_main 1304 1308 +4 applet_nameofs 652 654 +2 applet_install_loc 163 164 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 19/0) Total: 19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18ash: fix var_leak.tests so that it actually catches the NOFORK bugDenys Vlasenko
+ document the bug better Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18ash: fix bug which causes signal6.tests to failDenys Vlasenko
function old new delta trapcmd 271 277 +6 localcmd 277 275 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18ash: fix var_leak testcaseDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18ash: fix testsuite false positivesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18ash,hush: make bare "." set exitcode to 2Denys Vlasenko
function old new delta dotcmd 300 305 +5 builtin_source 176 171 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17shell/README: describe special builtinsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17hush: update bash compat todo commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17ash,hush: make "source" a synonym for . if bash compat is onDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17ash: fix ". empty_file" exitcode. +5 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17fix false positive in signal5.testsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17ash: use CONFIG_FEATURE_EDITING_MAX_LENDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17hush: fix hush-bugs/parse_err.testsDenys Vlasenko
function old new delta parse_stream 2325 2339 +14 builtin_umask 121 123 +2 builtin_type 116 114 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17add two more tests which currently failDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17ash: fix signal5.testsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17ash: add two testcases for (not yet fixed) ash bugsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16hush: mention PPID, RANDOM supportDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-15cttyhack: document the need to setsidDenys Vlasenko
function old new delta packed_usage 26988 27057 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-14cttyhack: don't do anything if ctty is already availableDenys Vlasenko
function old new delta cttyhack_main 244 269 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26ash: refresh stack pointers after makestrspace in rmescapesColin Watson
Without this, rmescapes sometimes returns random garbage while performing parameter expansions such as ${foo#bar}, in the event that the allocation of r happens to need to reallocate the stack and hence invalidate str and p. I'd love to provide a test case but unfortunately it's dependent on exact stack layout, so I don't have anything simpler than the situation described in https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/527401/comments/23 which involved a sequence of foo="${foo#*, }" expansions on a long string inside our RAID configuration tool. The same fix has been in dash since 2007-09-26, contributed by Roy Marples <uberlord@gentoo.org>. I actually came up with it independently almost to the character, but then synced it up with the variable naming used in dash when I noticed that change afterwards. Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26ash: line up builtin table. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26ash: trap with bad signal name should not abortDenys Vlasenko
function old new delta trapcmd 236 271 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23*: merge some common stringsDenys Vlasenko
text data bss dec hexfilename 838650 8009 0 846659 ceb43busybox_old 838519 8009 0 846528 ceac0busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23ash,hush: make it possible to build them individuallyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-13ash: fix quadratic matching slowdown is ${v/*foo*/repl} (really bad one)Denys Vlasenko
It is especially bad with patterns starting with "*". With ASH_OPTIMIZE_FOR_SIZE=y, only those are optimized, +few bytes: text data bss dec hex filename 836337 441 7564 844342 ce236 busybox_old 836341 441 7564 844346 ce23a busybox_unstripped With ASH_OPTIMIZE_FOR_SIZE off, we also optimize patterns _ending_ with "*", which costs about 80 bytes: text data bss dec hex filename 836656 441 7564 844661 ce375 busybox_old 836732 441 7564 844737 ce3c1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-08shell/ulimit: code shrink by 10 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-06hush: use ash's ulimit builtin; make it more more bash0like while at itDenys Vlasenko
Based on a patch by Tobias Klauser <tklauser@distanz.ch> function old new delta shell_builtin_ulimit - 498 +498 limits_tbl 33 88 +55 ulimit_opt_string - 38 +38 bltins1 288 300 +12 limits_name 127 - -127 ulimitcmd 415 7 -408 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/1 up/down: 603/-535) Total: 68 bytes text data bss dec hex filename 839229 453 6828 846510 ceaae busybox_old 839423 453 6828 846704 ceb70 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-05*: use NULL for null pointersDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-21Replace __uClinux__ define with !BB_MMUDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-21fix bug 1087. Fix by Leonid (lly.dev AT gmail.com)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>