Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug in cd



Pascal Byrne wrote:

> I've think I've found a bug in 3.0.5 and 3.1.5 when trying to cd into
> directories whose names have a space on the end. When I try changing to the
> directory using tab completion 3.0.5, "enters" the directory but actually
> displays the contents of the root directory. 3.1.5 doesn't recognise the
> directory exists at all.

> pbyrne@iesu87:~[17]% echo "$ZSH_VERSION"
> 3.0.5
> pbyrne@iesu87:~[18]% mkdir "Shell Scripts"
> pbyrne@iesu87:~[19]% cd Shell \Scripts \/
> pbyrne@iesu87:~/Shell Scripts [20]% ls
> Mail.rc        copywptg6      kernel         opt            sendmail.pid
> test           vol02
>

I have tried this on 3.0.5 running under both Red Hat and HPUX and can't
reproduce your bug. I assume that the mistakes in this are typos - you don't
make a directory with a space on the end like you said you would, and then
when you try to cd to it, the backslashes in the wrong place (and cd would
have complained of "too many arguments" if this was how it really
happened...). Nevertheless, I have tried all sorts of combinations and can't
get anything resembling your bug.

> .
> pbyrne@iesu87:~/Shell Scripts [21]% df -k .
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/vx/dsk/rootvol   492871  286715  156876    65%    /
> pbyrne@iesu87:~/Shell Scripts [22]% cd ..
> pbyrne@iesu87:~[23]% zsh3.1.5
> pbyrne@iesu87:~[1]% cd Shell\ Scripts\
> cd: no such file or directory: Shell Scripts
>

I haven't got 3.1.5 handy, but I tried it on an AIX machine with 3.1.4 and
again no joy. Perhaps there is something strange with your setup?

--
Andrew Gallagher
http://members.tripod.com/~AndrewGallagher/id.html





Messages sorted by: Reverse Date, Date, Thread, Author