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

Re: Bug#236350: zsh: _prefix completer broken?



On Fri, Mar 05, 2004 at 08:35:13PM -0500, Clint Adams wrote:
> >     zstyle ':completion:*' completer _complete _prefix
> > 
> > However, it doesn't seem that _prefix is having any effect.  According
> > to everything I've read, I should be able to type "vfoo", put the cursor
> > over the 'f', hit tab, and get offered completions like "vi", etc.
> > Instead, I just get a beep.
> 
> If you setopt COMPLETE_IN_WORD, it will complete vi, but otherwise, it
> doesn't appear that $SUFFIX is being set.

I really don't know how I missed that in the documentation and all the
searches I did, but when I setopt COMPLETE_IN_WORD, it indeed does work.
I guess the bug is only that compinstall doesn't generate a complete
configuration for _prefix.  It would probably also be useful to move the
mention of COMPLETE_IN_WORD higher in the documentation for _complete,
and include it in the examples.

I noticed a couple other things.  The documentation says that the
add-space style defaults to true.  This doesn't seem to be the case, as
if I complete with the cursor on 'f' in "egrefoo", I get just "p" by
default, and "p " with

    zstyle ':completion:*' completer _complete _prefix

in my config.

Also, when the completion on prefix succeeds, as in the "egrefoo"
example, there is a beep, unlike with a normal successful completion.
This is distracting.

Thanks for your help.

Andrew



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