Blame bash-4.4-case-in-command-subst.patch
|
Siteshwar Vashisht |
f379fd |
diff --git a/parse.y b/parse.y
|
|
Siteshwar Vashisht |
f379fd |
--- a/parse.y
|
|
Siteshwar Vashisht |
f379fd |
+++ b/parse.y
|
|
Siteshwar Vashisht |
f379fd |
@@ -4011,11 +4011,13 @@ eof_error:
|
|
Siteshwar Vashisht |
f379fd |
tflags |= LEX_RESWDOK;
|
|
Siteshwar Vashisht |
f379fd |
lex_rwlen = 0;
|
|
Siteshwar Vashisht |
f379fd |
}
|
|
Siteshwar Vashisht |
f379fd |
- else
|
|
Siteshwar Vashisht |
f379fd |
+ else if (shellmeta (ch) == 0)
|
|
Siteshwar Vashisht |
f379fd |
{
|
|
Siteshwar Vashisht |
f379fd |
tflags &= ~LEX_RESWDOK;
|
|
Siteshwar Vashisht |
f379fd |
/*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/
|
|
Siteshwar Vashisht |
f379fd |
}
|
|
Siteshwar Vashisht |
f379fd |
+ else /* can't be in a reserved word any more */
|
|
Siteshwar Vashisht |
f379fd |
+ lex_rwlen = 0;
|
|
Siteshwar Vashisht |
f379fd |
}
|
|
Siteshwar Vashisht |
f379fd |
else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
|
|
Siteshwar Vashisht |
f379fd |
; /* don't modify LEX_RESWDOK if we're starting a comment */
|