aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-04-03 22:43:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-04-15 22:16:46 +0200
commit84ba50c32f7dbfccddd5c5ca34d48d97c3f72193 (patch)
treedd2120def41d29e64d3a469edb26ece02f45724b /shell/ash.c
parent2b91958dff0b7bae83cf2c3f2db55bd248fe0956 (diff)
downloadbusybox-w32-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.tar.gz
busybox-w32-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.tar.bz2
busybox-w32-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.zip
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>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 13eeab34b..da9c95045 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11500,7 +11500,7 @@ parsesub: {
11500 || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) 11500 || (c != '(' && c != '{' && !is_name(c) && !is_special(c))
11501 ) { 11501 ) {
11502#if ENABLE_ASH_BASH_COMPAT 11502#if ENABLE_ASH_BASH_COMPAT
11503 if (c == '\'') 11503 if (syntax != DQSYNTAX && c == '\'')
11504 bash_dollar_squote = 1; 11504 bash_dollar_squote = 1;
11505 else 11505 else
11506#endif 11506#endif