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

Re: PATCH: predict-on (Re: Completeinword and ambiguous completions)



Bart Schaefer wrote:

> On Oct 21,  9:10am, Sven Wischnowsky wrote:
> } Subject: Re: Completeinword and ambiguous completions
> }
> } Bart Schaefer wrote:
> } > zsh% setopt prompt
> } > (feep, cursor stays on "m")
> } > 
> } > What I'd like is, in the first of those cases, the cursor doesn't stay
> } > on the "m" but rather moves to the end of the unambiguous prefix, so that
> } > I can immediately start menu completion for the rest of the word.
> } 
> }   compmatchers=('' 'r:|=*')
> } 
> } Is that good enough?
> 
> It seems to work some, but not all, of the time.  For example:
> 
> zagzig<4> setopt promptt
> 
> If the cursor is on the second `t' there are two possible completions
> (promptsubst and promptpercent).  So when the cursor is on the `m' I
> expect TAB to move it to the second `t'.  Instead I get a feep.

Ugh. The completion code doesn't try to do that at all, right.

You can try the (probably expensive):

  compmatchers=('r:|?=* r:|=*')

of course. This works for me at least with your example. Another way
would be to try completion again and again while moving the
cursor. But that would even be more expensive.

> Maybe the following will explain why I'm interested in this.  I want to
> press TAB in the middle of a predictivly-inserted line to jump ahead to
> the next spot where I might want to edit.

Almost-DWIM?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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