From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: &&||
Date: Mon, 19 Feb 2018 14:47:12 -0800 [thread overview]
Message-ID: <e57d2c8c-d78c-eeb3-35f9-b66778a9d6e7@eastlink.ca> (raw)
In-Reply-To: <20180219215726.4c25cc7d@ntlworld.com>
On 19/02/18 01:57 PM, Peter Stephenson wrote:
> You never need to use output from ls in a shell
Yeah, I was just trying to make a fast list of something to filter.
Mind, I do tend to forget about zsh's internal power when it comes to
that sort of thing so the reminder is welcome.
> Do you mean just "true"? Not sure what putting this in square brackets
Right, 'true' and 'false' live without any syntactic wrapping. I forgot.
> is supposed to achieve. It does work, but purely by virtue of the fact
>
> You can affect the precedence with braces, but they need to surround the
> "&&" or "||" expression you want to protect. In your case you've simply
> surrounded a pipeline which would be run in one go anyway:
That's my question, could my code be made to work more or less as it
is? I was expecting the braces to work. Otherwise I fairly well
understand the basic rules esp. the left>right thing, it really does
make life a bit simpler. Mind, I suppose that since return values are
always suspect perhaps an if/else construction really is just better.
next prev parent reply other threads:[~2018-02-19 22:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 21:12 &&|| Ray Andrews
2018-02-19 21:57 ` &&|| Peter Stephenson
2018-02-19 22:47 ` Ray Andrews [this message]
2018-02-20 9:26 ` &&|| Peter Stephenson
2018-02-20 7:54 ` &&|| Ray Andrews
2018-02-20 17:07 ` &&|| Peter Stephenson
2018-02-20 19:24 ` &&|| Ray Andrews
2018-02-20 20:28 ` &&|| Bart Schaefer
2018-02-20 21:45 ` &&|| Ray Andrews
-- strict thread matches above, loose matches on Subject: below --
2004-11-16 13:45 !!:$ keef
2004-11-16 14:22 ` !!:$ Peter Stephenson
2004-11-16 14:31 ` !!:$ Stephane Chazelas
2004-11-16 15:37 ` !!:$ Bart Schaefer
2004-11-16 16:08 ` !!:$ Peter Stephenson
2004-11-17 0:03 ` !!:$ Bart Schaefer
2004-11-17 19:25 ` !!:$ Danek Duvall
2004-11-18 1:10 ` !!:$ Bart Schaefer
2003-07-02 15:06 ?????? JEFF BICKLEY
2003-07-02 19:56 ` ?????? Thorsten Haude
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=e57d2c8c-d78c-eeb3-35f9-b66778a9d6e7@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@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).