From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Avoiding the zshells intelligence...in one case
Date: Tue, 24 Jan 2017 13:24:42 -0800 (PST) [thread overview]
Message-ID: <alpine.LRH.2.00.1701241320080.4560@toltec.zanshin.com> (raw)
In-Reply-To: <slrno8fb8e.3dr.martin@lounge.imp.fu-berlin.de>
On Tue, 24 Jan 2017, Martin Vaeth wrote:
> Bart Schaefer <schaefer@brasslantern.com> wrote:
> >
> > re_nomatch() { { ${~@} } always { setopt nomatch } }
> > alias t='setopt nonomatch && noglob re_nomatch echo'
>
> Why is this risky? Because it can leave nomatch in the wrong state?
Because if you accidentally use it in a pipeline it'll throw away its
standard input, and if you use it in a complex && || series it may not
produce the expected result.
Both of which are even worse if instead of "&&" you use a ";" as you did
in your more complicated formulation.
prev parent reply other threads:[~2017-01-24 21:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 8:01 Meino.Cramer
2017-01-22 18:26 ` Bart Schaefer
2017-01-22 21:52 ` Martin Vaeth
2017-01-22 22:41 ` Bart Schaefer
2017-01-23 18:09 ` Martin Vaeth
2017-01-23 22:26 ` Bart Schaefer
2017-01-23 22:40 ` Ray Andrews
2017-01-24 2:48 ` Eric Cook
2017-01-24 5:42 ` Ray Andrews
2017-01-24 15:58 ` Eric Cook
2017-01-24 18:21 ` Ray Andrews
2017-01-24 22:31 ` Bart Schaefer
2017-01-25 1:19 ` Ray Andrews
2017-01-25 3:46 ` Bart Schaefer
2017-01-25 5:40 ` Ray Andrews
2017-01-25 16:50 ` Bart Schaefer
2017-01-25 4:56 ` Bart Schaefer
2017-01-25 5:47 ` Ray Andrews
2017-01-23 22:44 ` Bart Schaefer
2017-01-24 19:37 ` Martin Vaeth
2017-01-24 21:24 ` 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=alpine.LRH.2.00.1701241320080.4560@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--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).