Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
Date: Sun, 12 Jun 2016 14:28:43 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: [PATCH 2/3] Fix the ':A' word modifier on paths with '..'
 components.
Message-ID: <20160612142843.GD10072@tarsus.local2>
References: <1465580184-3095-1-git-send-email-danielsh@tarsus.local2>
 <1465580184-3095-2-git-send-email-danielsh@tarsus.local2>
 <CAHYJk3RGbXMQacRTCfK2PFnN10rfX46dcy_LPi6P9E5b29hiAA@mail.gmail.com>
 <160610124623.ZM9598@torch.brasslantern.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <160610124623.ZM9598@torch.brasslantern.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Seq: zsh-workers 38663

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

