Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: cd '' doesn't produce an error
- X-seq: zsh-workers 22114
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: BUG: cd '' doesn't produce an error
- Date: Wed, 04 Jan 2006 11:41:52 +0000
- In-reply-to: <877j9mycf9.fsf@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <87zmmvxl3g.fsf@xxxxxxxxxxxxxxx> <20051221102159.44d9f5ca.pws@xxxxxxx> <877j9mycf9.fsf@xxxxxxxxxxxxxxx>
Ulrik Haugen wrote:
> If I try
> % cd /tmp; CDPATH=/usr cd ''
> I still wind up in /tmp, so it doesn't seem to have that much to do
> with cdpath to me.
That's because of the special handling of ".": if it doesn't occur in
cdpath, it's assumed to occur first.
That's long-standing behaviour, although I think the documentation (for
cd) is a bit screwy...
Otherwise [if the argument is not -], if a directory named arg
is not found in the current directory and arg does not begin
with a slash, search each component of the shell parameter
cdpath.
This isn't actually quite right, since if . is in $cdpath but not at
the start it doesn't search . straight away. So at least the
description needs improving (this isn't special to a null string).
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Your mail client is unable to display the latest news from CSR. To access our news copy this link into a web browser: http://www.csr.com/email_sig.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author