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

Re: Conditionally complete on space.



Grant Taylor wrote on Thu, 17 Aug 2017 22:32 -0600:
> 1)  I need to hit space an extra time after completion.  I.e. "sip   "
> results in "sipcalc  ".  -  It seems as if the second space is
> swallowed.  (I do not consider this a problem and am happy to live with it.

That doesn't seem to have anything to do with the widget:

    $ zsh -f
    % autoload compinit
    % compinit
    % sipcalc(){}
    % sipc<TAB><space>

results in BUFFER="sipcalc " with just one space.

> 2)  I seem to be stuck in a loop if I try to complete "kil" into "kill"
> because "killall" is also matched.

You can always <Ctrl+V><Space> to enter a literal space.

The REC_EXACT option works if you change expand-or-complete
to complete-word.  (In this case you may want to add _expand
to your 'completer' zstyle.)

Cheers,

Daniel



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