Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PRINT_EXIT_VALUE option in scripts
- X-seq: zsh-workers 31404
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PRINT_EXIT_VALUE option in scripts
- Date: Tue, 14 May 2013 16:15:45 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
The PRINT_EXIT_VALUE option doesn't work in scripts or when a file
is sourced:
----------------------------------------
#!/usr/bin/env zsh
echo $ZSH_VERSION
setopt PRINT_EXIT_VALUE
/bin/false
echo OK
----------------------------------------
ypig% ./tst
5.0.2
OK
ypig% source ./tst
5.0.2
OK
This was already the case with zsh 4.3.10.
Is this intentional? The man page just says:
PRINT_EXIT_VALUE (-1)
Print the exit value of programs with non-zero exit status.
Either the behavior or the documentation should be fixed.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author