about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/lex.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 351dedede..18ea94f53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,11 @@
 	Src/zsh.h, Test/D02glob.ztst: also ! and ^ need to be tokenised
 	in character set.
 
+2016-01-18  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 37682: Src/lex.c: when SH_GLOB is set (e.g. in "sh" emulation)
+	do not parse bare parentheses in arguments as a pattern grouping.
+
 2016-01-18  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 37678: Src/glob.c, Src/lex.c, Src/pattern.c, Src/utils.c,
diff --git a/Src/lex.c b/Src/lex.c
index 0202d2559..3ea878c7b 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -803,7 +803,7 @@ gettok(void)
 	    return INOUTPAR;
 	hungetc(d);
 	lexstop = 0;
-	if (!(incond == 1 || incmdpos))
+	if (!(isset(SHGLOB) || incond == 1 || incmdpos))
 	    break;
 	return INPAR;
     case LX1_OUTPAR: