diff options
author | Peter Stephenson <pws@zsh.org> | 2016-09-14 10:32:29 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2016-09-14 10:33:18 +0100 |
commit | a4b8ee13be494c8732c0348857befe87951a058b (patch) | |
tree | 5db582aeb688e4a1520f205a268765602f5b61e4 /Src/zsh.h | |
parent | be4c072cf50ffcc2e2c34e4edbb0e2a78900206b (diff) | |
download | zsh-a4b8ee13be494c8732c0348857befe87951a058b.tar.gz zsh-a4b8ee13be494c8732c0348857befe87951a058b.tar.xz zsh-a4b8ee13be494c8732c0348857befe87951a058b.zip |
zsh-users/21903: Fix ${...?...} in interactive shell.
On failure should abort back to top level, but we reset the error flag around commands. Add a hard error flag that's only reset at top level.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index 996bc3369..2dc5e7e2a 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -2807,7 +2807,14 @@ enum errflag_bits { /* * User interrupt. */ - ERRFLAG_INT = 2 + ERRFLAG_INT = 2, + /* + * Hard error --- return to top-level prompt in interactive + * shell. In non-interactive shell we'll typically already + * have exited. This is reset by "errflag = 0" in + * loop(toplevel = 1, ...). + */ + ERRFLAG_HARD = 4 }; /***********/ |