Re: :a modifier resolves symlinks - docs say it shouldn't

Langbart <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <rpnH98t3liRog9hOJqjAPRLxR7ZblORWvJFS8SGgsGkU1yBGDPEvGxY_mypofhzPkchid8cQI8IQyeQc-vz9gJScnedjMgroZJK4lO4gT-0=@protonmail.com>
> This does not say that symbolic links are preserved for "prepend the
> current directory."

the docs say it behaves like changing directories

When I `cd` into 'x' from '/tmp/.../link':
  pwd = /tmp/.../link/x    (logical, correct)

With `:a` :
  result = /tmp/.../real/x  (physical, contradicts "same manner as cd")

I still think it's a bug; the symlink current-directory case wasn’t considered

> You can see this more plainly if you change these two lines of your test:
>
>   cd ${tmp_dir}     # don't desend into link
>   dir=link/x

right, that is why I used the `:a` assuming it was immune to resolving symlinks
even when the current direcory is one. just an absolute path with appended
string was my expectation never resolving any symlinks.

> I suppose you may expect it to prepend $PWD rather than the current
> directory for relative paths, but that is not the case.

okay, I will workaround it

> imo it would be nice if it *did* prepend $PWD, that feels like the
> expected thing.

agreed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.