Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 1999 23:32:58 +0600 (ESS)
From:      Ilia Chipitsine <ilia@cgilh.chel.su>
To:        Kent Stewart <kstewart@3-cities.com>
Cc:        Roelof Osinga <roelof@nisser.com>, 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:  <Pine.BSF.4.05.9908272330060.330-100000@localhost.cgu.chel.su>
In-Reply-To: <37C6C100.88010551@3-cities.com>

next in thread | previous in thread | raw e-mail | index | archive | help
guys, what are you discussing ?
am I wrong ?

$ cd /mnt/dos/Progam\ Files
$

actually, I'd like to ..
$ cd /mnt/dos/Programme\ Files

<sigh>

Regards, (Наилучшие пожелания)

 Ilia Chipitsine (Илья Шипицин)

On Fri, 27 Aug 1999, Kent Stewart wrote:

> 
> 
> 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
> 



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?Pine.BSF.4.05.9908272330060.330-100000>