From ed7798ed07dde52fe2ff4eccb2d8ccab3adf8b42 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 12 Sep 2010 19:01:39 +0000 Subject: unposted: note exit trap runs before exit hook --- Doc/Zsh/builtins.yo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Doc') diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 2aa0affa9..02071fbeb 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1424,7 +1424,8 @@ The value of tt($?) at the start of execution is the exit status of the shell or the return status of the function exiting. If var(sig) is tt(0) or tt(EXIT) and the tt(trap) statement is not executed inside the body of a function, -then the command var(arg) is executed when the shell terminates. +then the command var(arg) is executed when the shell terminates; the +trap runs before any tt(zshexit) hook functions. tt(ZERR), tt(DEBUG), and tt(EXIT) traps are not executed inside other traps. tt(ZERR) and tt(DEBUG) traps are kept within subshells, while -- cgit 1.4.1