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

Re: Filename generation: instruct zsh not to follow symbolic links?



On Fri, Jul 17, 2026 at 3:50 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> But anyway, this doesn't really work: */foo(+nosym) also ignores the
> cases where "foo" is a symbolic link, while in <dir>/foo, I would want
> to ignore only the cases where <dir> is a symbolic link.

That's easy:

nosym() { [[ $REPLY:a:h == $REPLY:A:h ]] || typeset -g reply=() }




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