diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/lex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/lex.c b/Src/lex.c index 2988b41cb..8636a6fb4 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -877,7 +877,7 @@ gettok(void) dbparens = 1; return DINPAR; } - if (incmdpos) { + if (incmdpos || (isset(SHGLOB) && !isset(KSHGLOB))) { len = 0; bptr = tokstr = (char *) hcalloc(bsiz = 32); switch (cmd_or_math(CS_MATH)) { @@ -1141,6 +1141,8 @@ gettokstr(int c, int sub) break; if (incasepat && !len) return INPAR; + if (!isset(KSHGLOB) && len) + goto brk; } if (!in_brace_param) { if (!sub) { |