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 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.

-- 
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