about summary refs log tree commit diff
path: root/Doc/Zsh/options.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-07 16:25:14 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-07 16:25:14 +0000
commit2706eac45492b0fcdfc3cf104ac947e65d09ee25 (patch)
treeff7f6e2a05231a8444589e54c95313114ebcae07 /Doc/Zsh/options.yo
parentc4f33330f6797d0c199abf522f79c3ccac88ed55 (diff)
downloadzsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.tar.gz
zsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.tar.xz
zsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.zip
25415: Make DEBUG_BEFORE_CMD the default.
Reuse ERR_EXIT in DEBUG traps.
Clean up trapreturn code.
Diffstat (limited to 'Doc/Zsh/options.yo')
-rw-r--r--Doc/Zsh/options.yo9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index eec951d4f..a0d1f9c0d 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1046,7 +1046,7 @@ ifnzman(Arithmetic Evaluation)\
 ifzman(the section ARITHMETIC EVALUATION in zmanref(zshmisc))
 has an explicit list.
 )
-pindex(DEBUG_BEFORE_CMD)
+pindex(DEBUG_BEFORE_CMD <D>)
 cindex(traps, DEBUG, before or after command)
 cindex(DEBUG trap, before or after command)
 item(tt(DEBUG_BEFORE_CMD))(
@@ -1060,6 +1060,13 @@ item(tt(ERR_EXIT) (tt(-e), ksh: tt(-e)))(
 If a command has a non-zero exit status, execute the tt(ZERR)
 trap, if set, and exit.  This is disabled while running initialization
 scripts.
+
+The behaviour is also disabled inside tt(DEBUG) traps.  In this
+case the option is handled specially: it is unset on entry to
+the trap.  If the option tt(DEBUG_BEFORE_CMD) is set,
+as it is by default, and the option tt(ERR_EXIT) is found to have been set
+on exit, then the command for which the tt(DEBUG) trap is being executed is
+skipped.  The option is restored after the trap exits.
 )
 pindex(ERR_RETURN)
 cindex(function return, on error)