Denys Vlasenko
42ba757d5e
ash: improve set -x to quote strings as necessary
...
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>
2017-07-21 13:20:14 +02:00
Denys Vlasenko
4142f0187d
ash: fix escaping of a few characters (broken by last commits)
...
Add a testcase which tests all ASCII punctuation escapes.
NB: hush is failing this test!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-05 22:19:28 +02:00
Denys Vlasenko
fda9fafe27
ash: fix matching of unicode greek letter rho (cf 81) and similar cases
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-05 19:10:21 +02:00
Denys Vlasenko
5d6b8729ed
hush testsuite: add many tests from ash testsuite
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-02 17:39:31 +02:00
Denys Vlasenko
13f20919b2
ash: fix handling of NULs in $'abc\000def\x00asd'. Closes 9286
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-09-25 20:54:25 +02:00
Ron Yorston
84ba50c32f
ash: bash-compatible $'...' shouldn't expand in double quotes
...
Bash doesn't expand its $'...' construct in double quotes:
$ echo "$'a\tb'"
$'a\tb'
Change BusyBox ash to do the same. This also fixes a problem with
here documents where BusyBox ash gave an incorrect result for:
$ cat <<EOF
> '$'
> EOF
'$'
Reported-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-15 22:16:46 +02:00
Denys Vlasenko
fd33e17a2b
ash: fix obscure case of replacing + globbing + backslashes
...
function old new delta
subevalvar 1152 1178 +26
readtoken1 3267 3275 +8
redirect 1284 1286 +2
expandarg 957 958 +1
expdir 4 - -4
evalcommand 1219 1209 -10
expmeta 481 469 -12
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/2 up/down: 37/-26) Total: 11 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-26 22:55:44 +02:00
Denis Vlasenko
ef527f50e6
ash: optional support for $'...\t...\n...' bashism
...
function old new delta
readtoken1 2824 3172 +348
static.C_escapes - 18 +18
parse_command 1504 1500 -4
SIT 89 83 -6
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/2 up/down: 366/-10) Total: 356 bytes
2008-06-23 01:52:30 +00:00