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

PRINT_EXIT_VALUE problems



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