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 11:57 AM Mikael Magnusson <mikachu@xxxxxxxxx> 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=lfoo/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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author