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

Re: howto expand all possible completions?



Hi Bart,

> } Is there something like expand-completions or similar?
> 
> Do you already have _expand in your completers style?
No, thanks for the hint!
Hm, the description of the function sounds great but I don't understand how
it's supposed to work.  I've got TAB bound to complete-word and now use:
 zstyle ':completion:*' completer _expand _expand_dots _complete _match _correct _7slash
but the behavior is still the same: when I press TAB I get to see all the
possible completions but they don't get written to the command line.
Do I need any other style definitions?

> If so, my only other suggestion would be to try setopt nocaseglob.  I
> suspect that you have a lower-case to upper-case matcher-list style
> that is producing the mixed-case completions in the second example.
Correct.  nocaseglob would help in this example of mine but there are many
different cases where the completer shows all kinds of different types of
possible completions, e.g. the "partial match" style:
 zstyle ':completion:*' matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü} m:[-_]=[-_] r:|[-./_]=** r:|=*' '+l:|=*'
which gives:

 condor:~/pic/Nature>qiv ham<TAB>
 - files -
 A-Caribbean-reef-shark-swims-over-a-coral-reef-in-the-Bahamas.jpg  cham1024.jpg  cyclonegraham.jpg  

I tried calling the _expand function manually (via Alt-x) but that just
hogged the CPU so that I had to kill zsh. :-(

Thanks,
 Andy.

-- 
 Isn't making a smoking section in a restaurant
 like making a peeing section in a swimming pool?  (George Carlin, US comedian)



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