Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 1999 06:57:52 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Greg Lehey <grog@lemis.com>
Cc:        Roelof Osinga <roelof@nisser.com>, Patrick Seal <patseal@hyperhost.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Bash: space in cd arg bug? 
Message-ID:  <199908270557.GAA68309@keep.lan.Awfulhak.org>
In-Reply-To: Your message of "Wed, 25 Aug 1999 11:48:04 %2B0930." <19990825114804.E83273@freebie.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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"
> > <snip>
>            
>   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 <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




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?199908270557.GAA68309>