about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-09-18 02:33:37 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-09-18 02:33:37 +0000
commit0cdd7c451a86fd444767c6a2eb9e5ccbd4ebe8e9 (patch)
tree4c5ddac89f001de429de4954dcd02a31f785ed17 /Src/parse.c
parent485cb95acef1b2dbddfc962c13691dd0c0b44d28 (diff)
downloadzsh-0cdd7c451a86fd444767c6a2eb9e5ccbd4ebe8e9.tar.gz
zsh-0cdd7c451a86fd444767c6a2eb9e5ccbd4ebe8e9.tar.xz
zsh-0cdd7c451a86fd444767c6a2eb9e5ccbd4ebe8e9.zip
Merge of users/10087: "case foo in" didn't turn off aliases.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 9a7125ccd..9090624ec 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1021,6 +1021,7 @@ static void
 par_case(int *complex)
 {
     int oecused = ecused, brflag, p, pp, n = 1, type;
+    int ona, onc;
 
     p = ecadd(0);
 
@@ -1031,14 +1032,23 @@ par_case(int *complex)
     ecstr(tokstr);
 
     incmdpos = 1;
+    ona = noaliases;
+    onc = nocorrect;
+    noaliases = nocorrect = 1;
     yylex();
     while (tok == SEPER)
 	yylex();
     if (!(tok == STRING && !strcmp(tokstr, "in")) && tok != INBRACE)
+    {
+	noaliases = ona;
+	nocorrect = onc;
 	YYERRORV(oecused);
+    }
     brflag = (tok == INBRACE);
     incasepat = 1;
     incmdpos = 0;
+    noaliases = ona;
+    nocorrect = onc;
     yylex();
 
     for (;;) {