From owner-freebsd-questions Fri Aug 27 9: 2:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from nisser.com (n2000039.telekabel.chello.nl [212.187.0.39]) by hub.freebsd.org (Postfix) with ESMTP id 38C1114D5D for ; Fri, 27 Aug 1999 09:02:23 -0700 (PDT) (envelope-from roelof@nisser.com) Received: from nisser.com (roelof [10.0.0.2]) by nisser.com (8.9.3/8.9.2) with ESMTP id SAA89242; Fri, 27 Aug 1999 18:01:29 +0200 (CEST) (envelope-from roelof@nisser.com) Message-ID: <37C6B644.76441221@nisser.com> Date: Fri, 27 Aug 1999 18:01:08 +0200 From: Roelof Osinga Organization: eboa - engineering buro Office Automation X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Greg Lehey Cc: Brian Somers , Patrick Seal , freebsd-questions@FreeBSD.ORG Subject: Re: Bash: space in cd arg bug? References: <19990825114804.E83273@freebie.lemis.com> <199908270557.GAA68309@keep.lan.Awfulhak.org> <19990827153243.V483@freebie.lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey wrote: > > ... > > 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. It's way too early for me to be looking at this, especially since I switched to tea, but... I don't see the problem. Which usually means I'm overlooking something, so if someone could point it out to me slowly it will be appreciated. nisser:~$ FOO="Program Files" nisser:~$ echo $FOO Program Files nisser:~$ pushd $FOO bash: pushd: Program: No such file or directory nisser:~$ cd $FOO bash: cd: Program: No such file or directory The thing I fail to see is why y'all seemingly want parameter substitution to do something it doesn't. What the shell does is to substitute the contents of $FOO for occurance. Clearly, if I do the substition: nisser:~$ cd Program Files bash: cd: Program: No such file or directory it fails. So why shouldn't it fail when the shell does it? Then again, another thing that is beyond me is why this fails: nisser:~$ FOO='"Program Files"' nisser:~$ echo $FOO "Program Files" nisser:~$ cd $FOO bash: cd: "Program: No such file or directory nisser:~$ pushd $FOO bash: pushd: "Program: No such file or directory nisser:~$ csh % cd $FOO cd: Too many arguments. nisser:~$ sh \h:\w\$ cd $FOO cd: can't cd to "Program Well, at least it's consistent . Roelof -- Home is where the (@) http://eboa.com/ is. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message