From 73ebca4fe92767665422e7fd5dc15032add389b4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 21 Feb 2011 11:32:47 +0000 Subject: 28783: allow parentheses to be special in more places with SH_GLOB --- Src/lex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src') 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) { -- cgit 1.4.1