Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PRINT_EXIT_VALUE problems
- X-seq: zsh-users 16667
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: PRINT_EXIT_VALUE problems
- Date: Sat, 24 Dec 2011 12:13:47 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
This is not new, but there are two problems with the PRINT_EXIT_VALUE
option. They can be shown on the following example (under Debian):
$ zsh-beta -f
xvii% echo $ZSH_VERSION
4.3.15-dev-0-cvs1220
xvii% setopt PRINT_EXIT_VALUE
xvii% false || true
zsh: exit 1
xvii%
1. I don't think the value should be printed in the case of a program
before ||, because the goal of || is to ignore or handle the error.
This output is annoying in the case:
for i in *; do grep -q ... || echo $i
If the exit status can be useful in some cases, maybe this could be
controlled by an option.
2. Here zsh doesn't say which program failed. I suppose that the
problem is due to the fact that "false" is a builtin.
--
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 / Arénaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author