1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-07 23:51:14 +02:00

No POSIX "for" syntax with csh syntax.

This commit is contained in:
Bart Schaefer 2001-06-21 10:54:49 +00:00
parent 6c074dfaf3
commit e25f86419e
2 changed files with 6 additions and 4 deletions

View file

@ -1,7 +1,7 @@
2001-06-21 Bart Schaefer <schaefer@zsh.org> 2001-06-21 Bart Schaefer <schaefer@zsh.org>
* 15023: Src/parse.c: Accept newlines before the "in" keyword in * 15023, 15027: Src/parse.c: Accept newlines before the "in"
"for" and "select", per POSIX. keyword in "for" and "select", per POSIX.
* 15020: Completion/Zsh/Command/_cd, Completion/Zsh/Context/_autocd, * 15020: Completion/Zsh/Command/_cd, Completion/Zsh/Context/_autocd,
Completion/Zsh/Type/_command_names: When AUTO_CD is set, complete Completion/Zsh/Type/_command_names: When AUTO_CD is set, complete

View file

@ -903,13 +903,15 @@ par_for(int *complex)
yylex(); yylex();
type = WC_FOR_COND; type = WC_FOR_COND;
} else { } else {
int posix_in;
infor = 0; infor = 0;
if (tok != STRING || !isident(tokstr)) if (tok != STRING || !isident(tokstr))
YYERRORV(oecused); YYERRORV(oecused);
ecstr(tokstr); ecstr(tokstr);
incmdpos = 1; incmdpos = 1;
yylex(); yylex();
while (isnewlin && !csh) posix_in = isnewlin;
while (isnewlin)
yylex(); yylex();
if (tok == STRING && !strcmp(tokstr, "in")) { if (tok == STRING && !strcmp(tokstr, "in")) {
int np, n; int np, n;
@ -922,7 +924,7 @@ par_for(int *complex)
YYERRORV(oecused); YYERRORV(oecused);
ecbuf[np] = n; ecbuf[np] = n;
type = (sel ? WC_SELECT_LIST : WC_FOR_LIST); type = (sel ? WC_SELECT_LIST : WC_FOR_LIST);
} else if (tok == INPAR) { } else if (!posix_in && tok == INPAR) {
int np, n; int np, n;
incmdpos = 0; incmdpos = 0;