zsh-users
 help / color / mirror / code / Atom feed
* PRINT_EXIT_VALUE problems
@ 2011-12-24 11:13 Vincent Lefevre
  2011-12-27  7:40 ` Bart Schaefer
  2011-12-28 16:26 ` PRINT_EXIT_VALUE problems Nathan Dorfman
  0 siblings, 2 replies; 16+ messages in thread
From: Vincent Lefevre @ 2011-12-24 11:13 UTC (permalink / raw)
  To: zsh-users

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@vinc17.net> - 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)


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-01-05 21:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-24 11:13 PRINT_EXIT_VALUE problems Vincent Lefevre
2011-12-27  7:40 ` Bart Schaefer
2011-12-27 17:30   ` Bart Schaefer
2011-12-28 19:28   ` Bart Schaefer
2011-12-29  2:36     ` Vincent Lefevre
2011-12-30 20:11     ` autoload syntax Ray Andrews
2011-12-30 21:07       ` Bart Schaefer
2011-12-31  3:32         ` Mark van Dijk
2012-01-04 17:35         ` Ray Andrews
2012-01-05 20:13           ` Peter Stephenson
2012-01-05 20:32             ` Ray Andrews
2012-01-05 21:01               ` Peter Stephenson
2012-01-05 21:06               ` Mikael Magnusson
     [not found]                 ` <4F06163D.9040800@eastlink.ca>
2012-01-05 21:33                   ` Mikael Magnusson
2011-12-28 16:26 ` PRINT_EXIT_VALUE problems Nathan Dorfman
2011-12-28 18:42   ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).