Re: Filename generation: instruct zsh not to follow symbolic links?
Bart Schaefer <[email protected]> Fri, 17 Jul 2026 11:23:40 -0700
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAH+w=7YZR-na8J=j0bSSFw9YCSv1GVZaEkY2fzykHCge0-h++Q@mail.gmail.com> |
On Fri, Jul 17, 2026 at 10:18=E2=80=AFAM Mikael Magnusson <[email protected]= m> wrote: > > On Fri, Jul 17, 2026 at 6:33=E2=80=AFPM Bart Schaefer <schaefer@brasslant= ern.com> wrote: > > > > On Fri, Jul 17, 2026 at 3:50=E2=80=AFAM Vincent Lefevre <vincent@vinc17= .net> wrote: > > > > > > while in <dir>/foo, I would want > > > to ignore only the cases where <dir> is a symbolic link. > > > > nosym() { [[ $REPLY:a:h =3D=3D $REPLY:A:h ]] || typeset -g reply=3D() } > > This might need to be :h:a and :h:A respectively, in case the foo > symlink target has multiple components? Hm, I don't think :A would resolve links in the final component of the path, only in <dir> along the way? Can you provide a counter-example? Or am I not understanding the concern?