Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 1999 11:52:27 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Roelof Osinga <roelof@nisser.com>, Patrick Seal <patseal@hyperhost.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Bash: space in cd arg bug?
Message-ID:  <19990831115226.X13904@freebie.lemis.com>
In-Reply-To: <199908302302.AAA09780@keep.lan.Awfulhak.org>; from Brian Somers on Tue, Aug 31, 1999 at 12:02:20AM %2B0100
References:  <19990827153243.V483@freebie.lemis.com> <199908302302.AAA09780@keep.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 31 August 1999 at  0:02:20 +0100, Brian Somers wrote:
> [.....]
>>> You missed the
>>>
>>>     zsh -> echo $FOO
>>>     /C:/Program Files
>>>     zsh -> mkdir $FOO
>>>
>>> Which makes two directories.  Why should ``cd'' behave differently
>>> from an external command - just because it's a builtin ?
>>
>> It shouldn't.
>>
>>> IMHO, zsh is wrong.
>>
>> Agreed.  And bash does exactly the same thing in this case.
>
> Someone said that ``cd $FOO'' was being interpreted as
> ``cd "Program Files"'' (two words) rather than as
> ``cd Program Files'' (three words).  The correct interpretation
> (which is the same as bash's interpretation) is as three words.

Why is this correct?  How do I store a directory name which contains
in a variable and then change to it?  It's not correct just to cd $*
instead of cd $1, because there could be multiple contiguous spaces in
the directory name.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990831115226.X13904>