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

Re: Directory-only `cd' completion via compctl bug



On Thu, 19 Mar 1998, Eddy J. Gurney wrote:

> 
> # Another possibility for cd/pushd is to use it in conjunction with the
> # cdmatch function (in the Functions subdirectory of zsh distribution).
> 
> if [[ -o AUTO_REMOVE_SLASH ]] then
>     compctl -x 'p[2]' -Q -K cdmatch2 - 'S[/][~][./][../]' -g '*(-/)' + \
>         -g '*(-/D)' - 'n[-1,/], s[]' -K cdmatch -q -S '/' -- cd pushd
> else
>     compctl -x 'p[2]' -Q -K cdmatch2 - 'S[/][~][./][../]' -g '*(-/)' + \
>         -g '*(-/D)' - 'n[-1,/], s[]' -K cdmatch -S '/' -- cd pushd
> fi
> 
> This works great... except for one case that I've found so far.
> 
> If you try to CD into a directory with spaces in the name, for some
> reason it escapes the backslashes:
> 
> cd Schoolhouse\\\ Rock\\\ -\\\ America\\\ Rock/
> 

Just tried with zsg-3.1.2-zefram3 (+some patches) and it works quite fine.
I am using the same completion. Which zsh version do you have? Try to
start with vanilla zsh -f (may be, some options you set cause it). 


-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 796 99 20
SNI ITS Moscow			Tel:   +7 (095) 796 99 24

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------




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