mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
29626: arguments to anonymous functions shouldn't be parsed as command words
This commit is contained in:
parent
6844a63daf
commit
7d1480af54
4 changed files with 24 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2011-07-28 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 29626: Src/parse.c, Test/C04funcdef.ztst: arguments to
|
||||
anonymous functions shouldn't be parsed as command words.
|
||||
|
||||
* 29602 and subsequent changes: Doc/Zsh/expn.yo: clarify meaning
|
||||
of filename extension in :r and :e modifiers (which were
|
||||
slightly inconsistent).
|
||||
|
@ -15176,5 +15179,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5410 $
|
||||
* $Revision: 1.5411 $
|
||||
*****************************************************
|
||||
|
|
|
@ -4193,6 +4193,7 @@ arrfixenv(char *s, char **t)
|
|||
int
|
||||
zputenv(char *str)
|
||||
{
|
||||
DPUTS(!str, "Attempt to put null string into environment.");
|
||||
#ifdef USE_SET_UNSET_ENV
|
||||
/*
|
||||
* If we are using unsetenv() to remove values from the
|
||||
|
|
|
@ -1465,6 +1465,7 @@ par_funcdef(void)
|
|||
ecssub = oecssub;
|
||||
YYERRORV(oecused);
|
||||
}
|
||||
incmdpos = 0;
|
||||
zshlex();
|
||||
} else if (unset(SHORTLOOPS)) {
|
||||
lineno += oldlineno;
|
||||
|
@ -1720,6 +1721,7 @@ par_simple(int *complex, int nr)
|
|||
ecssub = oecssub;
|
||||
YYERROR(oecused);
|
||||
}
|
||||
incmdpos = 0;
|
||||
zshlex();
|
||||
} else {
|
||||
int ll, sl, c = 0;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
%prep
|
||||
|
||||
mkdir funcdef.tmp
|
||||
cd funcdef.tmp
|
||||
|
||||
%test
|
||||
|
||||
fn1() { return 1; }
|
||||
|
@ -228,6 +233,18 @@
|
|||
> print Following bit
|
||||
>}
|
||||
|
||||
touch yes no
|
||||
() { echo $1 } (y|z)*
|
||||
(echo here)
|
||||
() { echo $* } some (y|z)*
|
||||
() { echo empty };(echo here)
|
||||
0:Anonymous function arguments and command arguments
|
||||
>yes
|
||||
>here
|
||||
>some yes
|
||||
>empty
|
||||
>here
|
||||
|
||||
%clean
|
||||
|
||||
rm -f file.in file.out
|
||||
|
|
Loading…
Reference in a new issue