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 10:18 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> On Fri, Jul 17, 2026 at 6:33 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > On Fri, Jul 17, 2026 at 3:50 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> > >
> > > while in <dir>/foo, I would want
> > > to ignore only the cases where <dir> is a symbolic link.
> >
> > nosym() { [[ $REPLY:a:h == $REPLY:A:h ]] || typeset -g reply=() }
>
> 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?




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