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

Re: compctl question



Philip J. Hollenback wrote:

> 1. How do you get around the fact that the shell grabs the '='?  Can
> you turn that off for this one command?

Just use `-x "s[=]"' or `-x "S[=]"':

  comcptl -x 's[=]' -W ~/mail -f -- bar

> 2. Is there a way to write a completion that rewrites the what is
> already on the command line?  For instance, if I typed in this:

This is a bit tricky:

  foo() { reply=( ~/mail/${1[2,-1]}*${2}(N:t) ); reply=( \\\=$^reply ); }
  compctl -x 'S[=],S[\\=]' -UQK foo -- bar

But this has the side-effect of turning on menucompletion if automenu
is set.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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