From owner-freebsd-questions Thu Aug 26 23: 4:31 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id B3EB415ECA for ; Thu, 26 Aug 1999 23:04:10 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA11337; Fri, 27 Aug 1999 15:32:50 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id PAA05643; Fri, 27 Aug 1999 15:32:44 +0930 (CST) Date: Fri, 27 Aug 1999 15:32:44 +0930 From: Greg Lehey To: Brian Somers Cc: Roelof Osinga , Patrick Seal , freebsd-questions@FreeBSD.ORG Subject: Re: Bash: space in cd arg bug? Message-ID: <19990827153243.V483@freebie.lemis.com> References: <19990825114804.E83273@freebie.lemis.com> <199908270557.GAA68309@keep.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199908270557.GAA68309@keep.lan.Awfulhak.org>; from Brian Somers on Fri, Aug 27, 1999 at 06:57:52AM +0100 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 27 August 1999 at 6:57:52 +0100, Brian Somers wrote: >> On Wednesday, 25 August 1999 at 4:04:39 +0200, Roelof Osinga wrote: >>> Greg Lehey wrote: >>>> >>>> On Tuesday, 24 August 1999 at 21:30:27 -0400, Patrick Seal wrote: >>>>> cd /usr/local/win/Program\ Files/ >>>>> or >>>>> cd "/usr/local/win/Program Files/" >>>>> >>>>> both work tcsh, csh, sh, but in bash they result in an error: >>>>> bash: cd: /usr/local/win/Program: No such file or directory >>>>> >>>>> I can only think this is a bash bug, but it's so obvious it *should* have >>>>> been fixed long ago. >>>> >>>> You'd think so, wouldn't you? >>>> >>>>> Is this happening to anyone else? >>>> >>>> Yes. I changed to zsh because of it. >>> >>> nisser:~$ mkdir "Program Files" >>> >> >> zsh -> FOO=/C:/Program\ Files >> zsh -> echo $FOO >> /C:/Program Files >> zsh -> cd $FOO >> zsh -> pwd >> /C:/Program Files >> zsh -> cd >> zsh -> bash >> bash -> FOO=/C:/Program\ Files >> bash -> echo $FOO >> /C:/Program Files >> bash -> cd $FOO >> bash: cd: /C:/Program: No such file or directory >> bash -> > > 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. 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