diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-26 19:03:15 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-26 19:03:15 +0000 |
commit | 8569055841dfe84d1fa0f8e070e917309560caa4 (patch) | |
tree | 1ef2c433c90d2a4b064e332a17313a7f2d42d9b5 | |
parent | 3486b354e1a6d6a1ae7dfdbebc7018c66e6e430b (diff) | |
download | zsh-8569055841dfe84d1fa0f8e070e917309560caa4.tar.gz zsh-8569055841dfe84d1fa0f8e070e917309560caa4.tar.xz zsh-8569055841dfe84d1fa0f8e070e917309560caa4.zip |
users/10087: no aliases for case of "in" in "case"
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/parse.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index da22b044a..acfea7d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-26 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * users/10087: Src/parse.c: "case foo in" didn't turn off + aliases for "in", unlike "for" and "select". + 2006-03-26 Clint Adams <clint@zsh.org> * 22386: Completion/X/Command/_acroread: fix acroread diff --git a/Src/parse.c b/Src/parse.c index 1a6146968..a45231d15 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1023,6 +1023,7 @@ static void par_case(int *complex) { int oecused = ecused, brflag, p, pp, n = 1, type; + int ona, onc; p = ecadd(0); @@ -1033,14 +1034,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 (;;) { |