Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `cd .` in non-existent directory leads into weird corner case
On Mon, 2 Apr 2012 13:10:17 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> One (semi-)realistic case I came up with, one shell sits in a
> directory, someone else first moves the directory, then deletes it,
> then the shell tries to 'cd ..'. In this case I would like it to end
> up in the new parent directory as it does now [1], not the old
> "$PWD:h". (with chasedots/-P) (and even if I did 'cd .' first for some
> weird reason).
That last bit's going to depend on what error handling happens when "cd
." fails, both internally and in the shell code. Internally, the right
thing to do, presumably, is if we don't do the bogus PWD=. just leave
PWD as it was before, which seems natural enough. Otherwise, as far as
I can it's the same basic case as before --- if it used to do some
sensible it still should.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
Messages sorted by:
Reverse Date,
Date,
Thread,
Author