mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
39599: Don't reset status before "case" execution
This commit is contained in:
parent
b4cc190db9
commit
8f2ce89a0c
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-10-10 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 39599: Src/loop.c, Test/A01grammar.ztst: Don't reset status
|
||||
before "case" execution.
|
||||
|
||||
2016-10-07 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 39522: Doc/Zsh/contrib.yo: add-zsh-hook/add-zle-hook-widget:
|
||||
|
|
|
@ -592,7 +592,6 @@ execcase(Estate state, int do_exec)
|
|||
word = ecgetstr(state, EC_DUP, NULL);
|
||||
singsub(&word);
|
||||
untokenize(word);
|
||||
lastval = 0;
|
||||
|
||||
cmdpush(CS_CASE);
|
||||
while (state->pc < end) {
|
||||
|
|
|
@ -757,6 +757,14 @@
|
|||
>}
|
||||
>Stuff here
|
||||
|
||||
(exit 37)
|
||||
case $? in
|
||||
(37) echo $?
|
||||
;;
|
||||
esac
|
||||
0:case retains exit status for execution of cases
|
||||
>37
|
||||
|
||||
x=1
|
||||
x=2 | echo $x
|
||||
echo $x
|
||||
|
|
Loading…
Reference in a new issue