Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

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



[RESEND] 

> 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





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