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

Bart Schaefer <[email protected]> Fri, 17 Jul 2026 08:35:05 -0700
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <CAH+w=7bSaxi17Fx93FoMNVLDoOg9Ft36JfwAEjjg4ekKf+Q_+A@mail.gmail.com>
On Fri, Jul 17, 2026 at 3:50=E2=80=AFAM Vincent Lefevre <[email protected]=
> 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 =3D=3D $REPLY:A:h ]] || typeset -g reply=3D() }