1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-30 05:40:58 +01:00

27129: fix status at start of function, command subst, etc.

This commit is contained in:
Peter Stephenson 2009-07-11 16:42:53 +00:00
parent a8fb2bbc3d
commit bdfebe3e32
7 changed files with 64 additions and 8 deletions

View file

@ -553,3 +553,9 @@
0:Last status of successfully executed "." file is retained
>1
>0
echo 'echo $?' >dot_status
false
. ./dot_status
0:"." file sees status from previous command
>1

View file

@ -15,6 +15,13 @@
fnz
0:Empty function body resets status
fn3() { return 3; }
fnstat() { print $?; }
fn3
fnstat
0:Status is not reset on non-empty function body
>3
function f$$ () {
print regress expansion of function names
}

View file

@ -93,3 +93,8 @@
false
``
0:Empty command substitution resets status
false
echo `echo $?`
0:Non-empty command substitution inherits status
>1