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

Re: [PATCH 2/3] Fix the ':A' word modifier on paths with '..' components.



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



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