mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-10 18:58:03 +02:00
51134: ! return doesn't change the return status
This commit is contained in:
parent
14559421e2
commit
67d4bf5bb9
2 changed files with 13 additions and 1 deletions
|
@ -1961,7 +1961,7 @@ execpline(Estate state, wordcode slcode, int how, int last1)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
unqueue_signals();
|
unqueue_signals();
|
||||||
if ((slflags & WC_SUBLIST_NOT) && !errflag)
|
if ((slflags & WC_SUBLIST_NOT) && !errflag && !retflag)
|
||||||
lastval = !lastval;
|
lastval = !lastval;
|
||||||
}
|
}
|
||||||
if (!pline_level)
|
if (!pline_level)
|
||||||
|
|
|
@ -970,3 +970,15 @@ F:its expectations.
|
||||||
0:Non-interactive shell command input is line buffered
|
0:Non-interactive shell command input is line buffered
|
||||||
>Value is first
|
>Value is first
|
||||||
>Value is second
|
>Value is second
|
||||||
|
|
||||||
|
fn() {
|
||||||
|
! false
|
||||||
|
}
|
||||||
|
0:! inverts the status of implicit return
|
||||||
|
|
||||||
|
fn () {
|
||||||
|
false
|
||||||
|
! return
|
||||||
|
}
|
||||||
|
fn
|
||||||
|
1:! does not affect return status of explicit return
|
||||||
|
|
Loading…
Reference in a new issue