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

Bart Schaefer <[email protected]> Fri, 17 Jul 2026 12:24:34 -0700
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <CAH+w=7ZUBjtzDsCOGng=_ZYH5EANa0DO36UCve2k0j2VQG3ZRg@mail.gmail.com>
On Fri, Jul 17, 2026 at 11:57=E2=80=AFAM Mikael Magnusson <[email protected]=
m> wrote:
>
> > 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?
>
> % mkdir lfoo
> % mkdir lfoo/baz
> % ln -s baz/bing lfoo/foo
> % a=3Dlfoo/foo
> % touch lfoo/baz/bing
> % echo $a:A
> /tmp/a/lfoo/baz/bing
> % echo $a:A:h $a:a:h
> /tmp/a/lfoo/baz /tmp/a/lfoo
> % echo $a:h:A $a:h:a
> /tmp/a/lfoo /tmp/a/lfoo

Ah, I see.  Where the last component is itself symlinked to a
directory.  I could envision wanting that to go either way, but :h:A
is probably closer to what Vincent wanted.