Date: Fri, 27 Aug 1999 09:46:56 -0700 From: Kent Stewart <kstewart@3-cities.com> To: Roelof Osinga <roelof@nisser.com> Cc: Greg Lehey <grog@lemis.com>, Brian Somers <brian@Awfulhak.org>, Patrick Seal <patseal@hyperhost.net>, freebsd-questions@FreeBSD.ORG Subject: Re: Bash: space in cd arg bug? Message-ID: <37C6C100.88010551@3-cities.com> References: <19990825114804.E83273@freebie.lemis.com> <199908270557.GAA68309@keep.lan.Awfulhak.org> <19990827153243.V483@freebie.lemis.com> <37C6B644.76441221@nisser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Roelof Osinga wrote: > > 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 <g>. I thought MS was wrong when they introduced the space into directory names. But now you have a lot of systems out there with file systems that you would like to mount with SAMBA or NFS on NT and you know which OS needs to be fixed to keep up. I'm just surprised you didn't have to cd to progra~1 or what ever the choice would be. Kent > > 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 -- Kent Stewart Richland, WA mailto:kstewart@3-cities.com http://www.3-cities.com/~kstewart/index.html SETI (Search for Extraterrestrial Intelligence) @ Home http://setiathome.ssl.berkeley.edu/ 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?37C6C100.88010551>