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

Re: Simple Question.....I think?



>dpdhost:ttyp2:domenick:~% ls -dl down*
>drwx------   2 domenick sysop        1024 Sep  7 19:00 download/
>dpdhost:ttyp2:domenick:~%
>dpdhost:ttyp2:domenick:~% cd down*
>dpdhost:ttyp2:domenick:~/download%
>                                          ^^^^^^^^^
>                                      as you can see no
>                                      problem here.

Yes.  `down*' expands to one pathanme, `download', so the command is
effectively `cd download', which works normally.

>dpdhost:ttyp2:domenick:~% ls -dl /usr1/src/zsh*
>drwxrwxr-x   9 root     sysop        1024 Oct 15 16:21 /usr1/src/zsh-3.0.0/
>-rw-------   1 root     root         2637 Oct 15 15:48 /usr1/src/zsh-3.0.0.log
>dpdhost:ttyp2:domenick:~%
>dpdhost:ttyp2:domenick:~% cd /usr1/src/zsh*
>cd: string not in pwd: /usr1/src/zsh-3.0.0
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here `/usr1/src/zsh*' expands to two pathnames, `/usr1/src/zsh-3.0.0'
and `/usr1/src/zsh-3.0.0.log', making the command `cd
/usr1/src/zsh-3.0.0 /usr1/src/zsh-3.0.0.log'.  cd with two arguments
has a completely different meaning from cd with one argument -- see
zshbuiltins(1).

-zefram



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