about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-05 09:05:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-05 09:05:21 +0000
commit7ce1d5735832e51bc13e255f2e8549873c9688ff (patch)
tree4118a3d83afcbbf385bc43a0dfd576849b2bb1ad /Doc
parent52f401a4a7c90e338bd70b807c05e66ce3f2b783 (diff)
downloadzsh-7ce1d5735832e51bc13e255f2e8549873c9688ff.tar.gz
zsh-7ce1d5735832e51bc13e255f2e8549873c9688ff.tar.xz
zsh-7ce1d5735832e51bc13e255f2e8549873c9688ff.zip
25615: $ZSH_DEBUG_CMD for use in DEBUG traps
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/builtins.yo16
-rw-r--r--Doc/Zsh/func.yo10
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))(