mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-29 16:25:35 +01:00
39777: $() is a valid empty command substitution
This commit is contained in:
parent
ab81b98c49
commit
88c42a2ba0
3 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-10-30 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 39777: Src/parse.c, Test/D08cmdsubst.ztst: $() is a valid
|
||||
empty command substitution.
|
||||
|
||||
2016-10-29 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 39758: Src/builtin.c, Src/params.c: revise 39704 to output
|
||||
|
|
|
@ -594,7 +594,7 @@ par_event(int endtok)
|
|||
if (tok == ENDINPUT)
|
||||
return 0;
|
||||
if (tok == endtok)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
p = ecadd(0);
|
||||
|
||||
|
|
|
@ -153,3 +153,17 @@
|
|||
eval 'foo echo this just works, OK\?)'
|
||||
0:backtracking within command string parsing with alias still pending
|
||||
>this just works, OK?
|
||||
|
||||
(
|
||||
set errexit
|
||||
show_nargs() { print $#; }
|
||||
print a $() b
|
||||
print c "$()" d
|
||||
)
|
||||
0:Empty $() is a valid empty substitution.
|
||||
>a b
|
||||
>c d
|
||||
|
||||
empty=$() && print "'$empty'"
|
||||
0:Empty $() is a valid assignment
|
||||
>''
|
||||
|
|
Loading…
Reference in a new issue