zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: PRINT_EXIT_VALUE: Suppress for if/while conditions
Date: Tue, 18 Aug 2015 17:25:17 -0700	[thread overview]
Message-ID: <150818172517.ZM31990@torch.brasslantern.com> (raw)
In-Reply-To: <20150819000649.GA29640@zira.vinc17.org>

On Aug 19,  2:06am, Vincent Lefevre wrote:
} Subject: Re: PRINT_EXIT_VALUE: Suppress for if/while conditions
}
} > for i in file1 file2; do
} >   veryimportanttask $i
} > done
} 
} But you don't know which one:
} 
} $ for i in 1 2; do /bin/false $i; done
} zsh: exit 1     /bin/false $i
} zsh: exit 1     /bin/false $i

    eval "veryimportanttask ${(b)i}"

Of course then printexitvalue prints "exit 1" for each of the eval
as well.  *There* is a case where it's probably entirely extraneous.

torch% setopt printexitvalue
torch% for i in 1 2; do eval /bin/false $i; done
zsh: exit 1     /bin/false 1
zsh: exit 1
zsh: exit 1     /bin/false 2
zsh: exit 1


      reply	other threads:[~2015-08-19  0:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 23:12 Daniel Shahaf
2015-08-13  8:32 ` Peter Stephenson
2015-08-13 23:20   ` Daniel Shahaf
2015-08-14  8:19     ` Peter Stephenson
2015-08-17 22:00       ` Daniel Shahaf
2015-08-15  1:04 ` Vincent Lefevre
2015-08-15  1:20   ` Mikael Magnusson
2015-08-19  0:06     ` Vincent Lefevre
2015-08-19  0:25       ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150818172517.ZM31990@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).