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,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc;
        bh=PiP58OlI5tW/KCPZjc9cprsW0ZZkzTd54tvrj4LQ0S8=;
        b=PPhcbvlVyDTB94poTe9MZHYZg2TQP+Aky7C8whVomOjDxnRRP+jeBOwtBLUZkZYOag
         rLahx3Tkt/N3jrTkm9qG+7uL3xVgStfp9izLyYHFN0LnLUavciR87eawsf8MKoqd5yhf
         s0throMUAcUawpwYTVAeq9BGcJ3pzyUIH9nbFaaPjmeOMUFwX33IoiLxqYyKR3ybeRVn
         t6uR1RcSOO4mx3J4AximnGSXV2HJMnXv2KRkTeIeUejMMibMWhrorckEtFMdpkZNagNc
         O8Ck2Dhi6jsrtVWT6AX34Yh9Giu0nTsuTpd3csOrSoHvYQ4Zmcqyn+6w+hmYdQsIPgKf
         ODVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc;
        bh=PiP58OlI5tW/KCPZjc9cprsW0ZZkzTd54tvrj4LQ0S8=;
        b=kQ3ndDDaw3L3oL/84t5xd63UHIuwuHO/NdFw+heptyppbusdlkCFM5PU5ks41ZY9FH
         KBeiGYKeQJXZM7Rskg2GRGTbhfaXjD5kcGWxzzCovIgEmJbbtpRaNIUzh9aSMePcuIzU
         Sz/EFYpQs9IwSDde/524ykGWjc7Yp/rERYMGHe92lBaOR0Y4k6Nn2QP+55m29YTBaGdO
         7jzlX8WyMcErFoBwXJjHwPONmvxBPvPcyOFiBlbIENeiw4F0mLU7bvmQ5oQAc55Hz3qK
         3HkiMidj887Mx0tM95+db12wlInNMHDMmsRQ1LYML/NNaTts1cVA/skKOSbwMgVd8ReD
         SOzw==
X-Gm-Message-State: ALyK8tKAZa+zCHPPbECdSDSRow9QXLVK/JQIAKmSBfb46+VIABrqmYOmHQ3j/bjAtcsqqr9CZheFb7hnU2YNiw==
X-Received: by 10.55.110.65 with SMTP id j62mr12851064qkc.112.1466873279167;
 Sat, 25 Jun 2016 09:47:59 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <20160625162807.GA9840@tarsus.local2>
References: <20160613085218.GA9572@tarsus.local2> <1466474004-4669-1-git-send-email-danielsh@tarsus.local2>
 <1466474004-4669-2-git-send-email-danielsh@tarsus.local2> <CAHYJk3QPM+wKmzoT5jhPD90e=kYpdT0Yf2hNXcZd9woUSov+Mg@mail.gmail.com>
 <20160625162807.GA9840@tarsus.local2>
From: Mikael Magnusson <mikachu@gmail.com>
Date: Sat, 25 Jun 2016 18:47:58 +0200
Message-ID: <CAHYJk3SrjHP3mT+c7xWH49ozhh18WHvLC5LRUzoZwWnkSSv8fA@mail.gmail.com>
Subject: Re: [PATCH v2 2/3] Fix the ':A' word modifier on paths with '..' components.
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh workers <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 38761

On Sat, Jun 25, 2016 at 6:28 PM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Mikael Magnusson wrote on Tue, Jun 21, 2016 at 05:08:16 +0200:
>> On Tue, Jun 21, 2016 at 3:53 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>> > The fix is to stop calling chabspath() at the top of chrealpath().
>> >
>> > Preserve the old behaviour when CHASE_DOTS is set.
>>
>> I think this is backwards, cd symlink/.. gets you to the current dir
>> if chasedots is unset, and to wherever symlink points' parent
>> directory when it is set.
>
> True.
>
> However, I don't want to just flip the condition (change "if isset()" to
> "if unset()") since I think the new behaviour (resolving symlinks before
> '..' components) should be the default for :A.
>
> So how about adding a new option and having chrealpath() use the new
> behaviour if the new option is at its default value, and the old
> (':a'-ish) behaviour otherwise?

That sounds pretty pointless, you would still break existing scripts,
and make everyone have to versioncheck to see if they have to enable
an option or not.

-- 
Mikael Magnusson

