From owner-freebsd-questions Thu Aug 26 23:45:36 1999 Delivered-To: freebsd-questions@freebsd.org Received: from corewar.protovision.org (we-24-130-70-108.we.mediaone.net [24.130.70.108]) by hub.freebsd.org (Postfix) with ESMTP id 13CFF154B8 for ; Thu, 26 Aug 1999 23:45:33 -0700 (PDT) (envelope-from RoboHak@protovision.org) Received: from corewar.protovision.org (RoboHak@corewar.protovision.org [24.130.70.108]) by corewar.protovision.org (8.9.1a/8.9.1) with ESMTP id XAA25342; Thu, 26 Aug 1999 23:44:43 -0700 Date: Thu, 26 Aug 1999 23:44:42 -0700 (PDT) From: RoboHak To: Brian Somers Cc: Greg Lehey , Roelof Osinga , Patrick Seal , freebsd-questions@FreeBSD.ORG Subject: Re: Bash: space in cd arg bug? In-Reply-To: <199908270557.GAA68309@keep.lan.Awfulhak.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 27 Aug 1999, 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 ? > > IMHO, zsh is wrong. > -- > Brian > > Don't _EVER_ lose your sense of humour ! Don't know what version of zsh you're using, but with zsh 3.1.6 it doesn't create 2 directories at all. zsh -> FOO=some\ dir zsh -> echo $FOO some dir zsh -> mkdir $FOO zsh -> ls -d some* some dir/ zsh -> cd $FOO zsh -> pwd /home/RoboHak/some dir zsh -> cd .. zsh -> rm -rf $FOO zsh -> ls -d some* zsh: no matches found: some* zsh -> echo $ZSH_VERSION 3.1.6 -- RoboHak RoboHak@protovision.org | RoboHak@mediaone.net =========================== GEEK CODE BLOCK ============================ GCS/CC/E/ED/IT/M/S d-- s++:-- a19 C+++(++++) UL++++ P+>++ L+++(++++) E- W+++(--)$ N+(++) o? K- w--- O-- M-- V-- PS+ PE Y+(++) PGP++@ t+ 5(+) X+@ R tv@ b++@ DI+++ D++@ G e h! r-- y-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message