From 2706eac45492b0fcdfc3cf104ac947e65d09ee25 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 7 Aug 2008 16:25:14 +0000 Subject: 25415: Make DEBUG_BEFORE_CMD the default. Reuse ERR_EXIT in DEBUG traps. Clean up trapreturn code. --- Doc/Zsh/options.yo | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Doc/Zsh/options.yo') 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 ) 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) -- cgit 1.4.1