Subject: Re: [PATCH 2/3] Fix the ':A' word modifier on paths with '..' components.
From: Daniel Shahaf <[email-masked]>
To: zsh workers <[email-masked]>
Date: Sun, 12 Jun 2016 14:28:43 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Bart Schaefer wrote on Fri, Jun 10, 2016 at 12:46:23 -0700:
> On Jun 10,  8:54pm, Mikael Magnusson wrote:
> }
> } This seems pretty controversial, but I can see people wanting it
> } either way. See for example the chasedots / chaselinks options,
> 
> Perhaps :A should honor those options.  Of course that would make it
> marginally more difficult for script writers to reliably use :A, but
> both of those options are reset in every "emulate" mode.

So, how about:

- :a remains as it is today
- :A when CHASE_DOTS set: same as :A today (resolves '..' first and
  symlinks second)
- :A when CHASE_DOTS unset: as in the patch: equivalent to realpath(3)
  except that non-existing trailing path components are permitted

Would that address everyone's concerns?

Note this doesn't use CHASE_LINKS at all, neither in :A nor in :a.

Mikael: I wasn't planning to push this until everyone has had ample
opportunity to comment on the proposed change.

Cheers,

Daniel