From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: glob qualifier '-' doesn't work correctly on dangling symlinks
Date: Sun, 12 Apr 2020 01:21:55 +0000 [thread overview]
Message-ID: <20200412012155.7954a35f@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20200411234817.GA1737986@zira.vinc17.org>
Vincent Lefevre wrote on Sun, 12 Apr 2020 01:48 +0200:
> On 2020-04-11 21:37:14 +0100, Stephane Chazelas wrote:
> > find -xtype l and *(-@) are common, documented idioms. If only
> > for that, I don't think the behaviour should be changed.
> >
> > And it's not clear what the better behaviour would be.
> >
> > If that broken link should not be matched by *(-W), should it be
> > matched by *(-^W)? Why?
>
> No, just like file0(^W) gives "zsh: no match" (as file0 does not exist).
>
> > Or should that fail the glob (cause the shell process to exit)?
>
> The shell process should not exit (except with "set -e").
> The behavior should be: replace the link by the target, then
> apply the glob qualifiers.
>
To be explicit, then, the proposal is that «brokensymlink(-W)» and
«brokensymlink(-^W)» should both trigger the "no match" error? (I.e.,
the target of a broken symlink is neither writable nor not writable.)
What should «brokensymlink(-)» do?
What would be the glob qualifier syntax for broken symlinks?
Cheers,
Daniel
(ENOTIME, so not expressing an opinion and not diving into the various
points being made; just wanted to clarify a few points.)
next prev parent reply other threads:[~2020-04-12 1:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 15:15 Vincent Lefevre
2020-04-11 17:34 ` Stephane Chazelas
2020-04-11 19:17 ` Vincent Lefevre
2020-04-11 20:37 ` Stephane Chazelas
2020-04-11 23:48 ` Vincent Lefevre
2020-04-12 1:21 ` Daniel Shahaf [this message]
2020-04-12 2:17 ` Vincent Lefevre
2020-04-12 7:09 ` Stephane Chazelas
2020-04-12 14:25 ` Vincent Lefevre
2020-04-12 17:34 ` Stephane Chazelas
2020-04-12 23:38 ` Vincent Lefevre
2020-04-13 14:22 ` Stephane Chazelas
2020-04-13 15:00 ` Bart Schaefer
2020-04-13 21:41 ` Vincent Lefevre
2020-04-14 6:18 ` Stephane Chazelas
2020-04-14 12:02 ` Daniel Shahaf
2020-04-14 12:38 ` Stephane Chazelas
2020-04-15 0:44 ` Daniel Shahaf
2020-04-15 9:17 ` Vincent Lefevre
2020-04-14 17:59 ` Vincent Lefevre
2020-04-12 12:48 ` Peter Stephenson
2020-04-12 14:31 ` Vincent Lefevre
2020-04-12 15:49 ` Peter Stephenson
2020-04-12 23:07 ` Vincent Lefevre
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=20200412012155.7954a35f@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).