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

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



On Mon, Apr 13, 2020 at 7:23 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> [...]
> >   -e  pathname
> >     True if pathname resolves to an existing directory entry.
> >     False if pathname cannot be resolved.
> >
> > BTW, I don't know how zsh behaves on "[[ -e pathname ]]" in case of
> > error other than ENOENT in the pathname resolution, but this should
> > be documented (and ditto for the other conditional expressions).
> [...]
>
> The mention of "directory entry" is misleading here. It's really
> about a "file" more than a "directory entry" as stat() gets you
> to the inode.

The problem is that "file" implies "not a directory", but a symlink
can refer to either.  And many users don't know the concept of "inode"
as separate from "directory entry".



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