Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `cd .` in non-existent directory leads into weird corner case
- X-seq: zsh-users 16951
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- Subject: Re: `cd .` in non-existent directory leads into weird corner case
- Date: Mon, 2 Apr 2012 12:56:55 +0200
- Cc: zsh-users@xxxxxxx
- 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==
- In-reply-to: <20120402111219.62cbd0c7@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAD77+gT4LXRyTL8V1UZrNfCohyJ9peTNdfZ=G7Q-sJcDnyNE8Q@mail.gmail.com> <120327073414.ZM6783@torch.brasslantern.com> <CAD77+gSn9zrTHDMj=zi_Y5M6b86pOizkUin8zVVEAU1aTfuKfw@mail.gmail.com> <20120402111219.62cbd0c7@pwslap01u.europe.root.pri>
On 2 April 2012 12:12, Peter Stephenson <Peter.Stephenson@xxxxxxx> wrote:
> On Mon, 2 Apr 2012 11:52:02 +0200
> Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:
>> On Tue, Mar 27, 2012 at 16:34, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author