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:
parent
a8fb2bbc3d
commit
bdfebe3e32
7 changed files with 64 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,3 +93,8 @@
|
|||
false
|
||||
``
|
||||
0:Empty command substitution resets status
|
||||
|
||||
false
|
||||
echo `echo $?`
|
||||
0:Non-empty command substitution inherits status
|
||||
>1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue