From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3264 invoked by alias); 2 Apr 2012 10:57:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16951 Received: (qmail 7428 invoked from network); 2 Apr 2012 10:57:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.44 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RWXrCpFxZO6hsldlsWkptkLyhkmrUGuZW1aefG6Ef4Q=; b=ku6rdK2q8sN++xnDjv3tjPIrNNZzF4zTr5vNZXV4po+fNgkbGCiAi2Wy9xH094YTB+ OhLxnfJlkx/jKqDvIx+/5RCrEYzjw5I+OHl4qY1Sn20h/LlH+2I4s9b+DlpQRdjAOsgd mEZ+YGWgMyAOPm+G2W5ReFjGF0aOQ1Pi9YFA4Dk5peGVFJgk4X5+Ze/GLH003gG1r7zn 9ig4qqURr77FTTYSoYhEWdurahIayVloqQ9FrSMkb7ld8lB3CEOKOWUrQwZ2fS4wDVlo 6iDdd4/0TpnpVwKx+bHRFDz9EPKiRfjckvpgVCZB41JDek6Jy90a0val1oLH/1TgdkZP 1h0Q== MIME-Version: 1.0 In-Reply-To: <20120402111219.62cbd0c7@pwslap01u.europe.root.pri> References: <120327073414.ZM6783@torch.brasslantern.com> <20120402111219.62cbd0c7@pwslap01u.europe.root.pri> Date: Mon, 2 Apr 2012 12:56:55 +0200 Message-ID: Subject: Re: `cd .` in non-existent directory leads into weird corner case From: Mikael Magnusson To: Peter Stephenson Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On 2 April 2012 12:12, Peter Stephenson wrote: > On Mon, 2 Apr 2012 11:52:02 +0200 > Richard Hartmann wrote: >> On Tue, Mar 27, 2012 at 16:34, Bart Schaefer wrote: >> >> > However, I've always been a little puzzled about the decision to set >> > $PWD to "." in this case. Bash remembers the relative location: >> >> Just to make sure this does not get lost, do we agree that not >> changing $PWD to a literal dot would make sense? Escalating the ENOENT >> to the user is probably the best approach. > > Sounds OK. Silently failing and changing the directory reported doesn't > really do a lot of good to anyone. Can we keep the current behaviour for cd -P? Sometimes I mv directories and like to end up in the correct place when I cd .. in a shell that was 'moved'. Maybe this case wouldn't be affected, but it still feels more consistent to me if I keep following the physical links even if it was deleted. -- Mikael Magnusson