diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Zsh/builtins.yo | 16 | ||||
-rw-r--r-- | Doc/Zsh/func.yo | 10 |
2 files changed, 17 insertions, 9 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index f8ee29a24..c47ae49e7 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1307,11 +1307,19 @@ usual case). If var(sig) is tt(DEBUG) then var(arg) will be executed before each command if the option tt(DEBUG_BEFORE_CMD) is set -(as it is by default), else after each command. In the former -case it is possible to skip the next command; see -the description of the tt(ERR_EXIT) option in +(as it is by default), else after each command. Here, a `command' is +what is described as a `sublist' in the shell grammar, see +ifnzman(noderef(Simple Commands & Pipelines))\ +ifzman(the section SIMPLE COMMANDS & PIPELINES in zmanref(zshmisc)). +If tt(DEBUG_BEFORE_CMD) is set various additional features are available. +First, it is possible to skip the next command by setting the option +tt(ERR_EXIT); see the description of the tt(ERR_EXIT) option in ifzman(zmanref(zshoptions))\ -ifnzman(noderef(Description of Options)). +ifnzman(noderef(Description of Options)). Also, the shell parameter +tt(ZSH_DEBUG_CMD) is set to the string corresponding to the command +to be executed following the trap. Note that this string is reconstructed +from the internal format and may not be formatted the same way as the +original text. The parameter is unset after the trap is executed. If var(sig) is tt(0) or tt(EXIT) and the tt(trap) statement is executed inside the body of a function, diff --git a/Doc/Zsh/func.yo b/Doc/Zsh/func.yo index 888cf3ce2..aaac5fa5a 100644 --- a/Doc/Zsh/func.yo +++ b/Doc/Zsh/func.yo @@ -309,11 +309,11 @@ executed inside other traps. findex(TRAPDEBUG) item(tt(TRAPDEBUG))( If the option tt(DEBUG_BEFORE_CMD) is set (as it is by default), executed -before each command; otherwise executed after each command. In the former -case it is possible to skip the next command; see the description of the -tt(ERR_EXIT) option in -ifzman(zmanref(zshoptions))\ -ifnzman(noderef(Description of Options)). +before each command; otherwise executed after each command. See +the description of the tt(trap) builtin in +ifnzman(noderef(Shell Builtin Commands))\ +ifzman(zmanref(zshbuiltins)) for details of additional features provided +in debug traps. ) findex(TRAPEXIT) item(tt(TRAPEXIT))( |