From 7ce1d5735832e51bc13e255f2e8549873c9688ff Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 5 Sep 2008 09:05:21 +0000 Subject: 25615: $ZSH_DEBUG_CMD for use in DEBUG traps --- Test/C05debug.ztst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Test/C05debug.ztst') diff --git a/Test/C05debug.ztst b/Test/C05debug.ztst index a6ef54bb4..6594eb8a1 100644 --- a/Test/C05debug.ztst +++ b/Test/C05debug.ztst @@ -112,3 +112,28 @@ > second > third + fn() { + emulate -L zsh; setopt debugbeforecmd + trap 'print "$LINENO: '\''$ZSH_DEBUG_CMD'\''"' DEBUG + print foo && + print bar || + print rod + x=y + print $x + fn2() { echo wow } + fn2 + } + fn +0:ZSH_DEBUG_CMD in debug traps +>3: 'print foo && print bar || print rod' +>foo +>bar +>6: 'x=y ' +>7: 'print $x' +>y +>8: 'fn2 () { +> echo wow +>}' +>9: 'fn2' +>0: 'echo wow' +>wow -- cgit 1.4.1