Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: glob qualifier '-' doesn't work correctly on dangling symlinks
2020-04-11 21:17:11 +0200, Vincent Lefevre:
[...]
> > That's consistent with GNU find's -xtype l
>
> But the behavior is not consistent with the stat system call, with
> the GNU stat utility (when using the --dereference option), and with
> zsh/stat.
[...]
But ls/stat report information, and find/globs find files.
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? Or should that fail the glob (cause the
shell process to exit)? What about for *(-e:code:)?
Here, you can always work around the problem with *(-W^@).
IMO, the current behaviour, though not ideal is probably the
best you can get (and again, it's consistent with "find"'s).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author