Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PRINT_EXIT_VALUE option in scripts



On Tue, 14 May 2013 16:15:45 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> The PRINT_EXIT_VALUE option doesn't work in scripts or when a file
> is sourced:

Looking at the code it's not entirely clear to me what the determing
factor is, but the following weasel words ought to do it.

diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index ce24a22..60892dd 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1240,6 +1240,7 @@ pindex(NOPRINTEXITVALUE)
 cindex(exit status, printing)
 item(tt(PRINT_EXIT_VALUE) (tt(-1)))(
 Print the exit value of programs with non-zero exit status.
+This is only available at the command line in interactive shells.
 )
 pindex(RC_QUOTES)
 pindex(NO_RC_QUOTES)

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author