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

Re: zsh - new user with questions



On Aug 18,  3:46pm, David Hedbor wrote:
> Subject: Re: zsh - new user with questions
> Peter Stephenson <pws@xxxxxx> writes:
> 
> bash-2.01$ ls /usr/loc/bi
>                       ^        
> bash-2.01$ ls /usr/local/bi
>                         ^
> With zsh:
> 
> ls /usr/loc/bi           => beep
>            ^
> ls /usr/loc/bin          => /usr/local/bin/
>            ^                          ^
> So problem one is that local is not expanded if the path segment after 
> it doesn't exist.

Try the following:

unsetopt completeinword
bindkey \^I expand-or-complete-prefix

Those settings will produce the effect you describe.  However, you may find
other differences from bash; I don't think there's any combinations of zsh
completion settings that exactly duplicate it.

You might also try setting up Functions/multicomp for extensive embedded
directory name completion.

> ls /usr/loc/bin/         => /usr/local/bin//
>            ^                          ^
> The second problem is that zsh adds a "/" at the end 
> of the path - always. I'd prefer if it didn't add one at all or at
> least just one (the infinite number of added slashes is clearly a
> bug).

I don't see that behavior, but I'm running a much-patched zsh.  What version
are you using?

> The third problem is something that often bites me hard:
> 
> bash: ls /usr/lobin	=> /usr/local/bin
> 		^	       		
> bash: ls /usr/lobin	=> beep
> 		^	       		
> Ie zsh can't complete the path if the cursor is not on a slash.

The expand-or-complete-prefix binding will take care of that, too.



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