Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: glob qualifier '-' doesn't work correctly on dangling symlinks



On 2020-04-12 13:48:43 +0100, Peter Stephenson wrote:
> For convenience, the proposed wording in the attached is
> 
> item(tt(-))(
> toggles between making the qualifiers work on symbolic links (the
> default) and the files they point to, if any; a broken symbolic link
> is treated as a file in its own right
> )

The term "broken symbolic link" should properly be defined.
It seems that the zsh code ignores all stat() errors, so that
this may be very surprising, if not dangerous. Imagine a script
whose goal is to remove all dangling symlinks, but could remove
valid ones due to undetected errors as not reported by zsh...

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author