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

Re: X font completion is buggy



On Mon, Jul 27, 2015 at 5:19 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jul 27,  1:01am, Vincent Lefevre wrote:
> }
> } But if I type "1", how can I disambiguate between -1 and -15 so that
> } the cursor moves back to the "n"?
>
> A reasonable question, but not one that is specific to _x_fonts.
>
> As usual for Sven-era code the abbreviations are impenetrable, so it's
> very difficult to find where compstate[unambiguous_cursor] is being
> calculated, but it's always set to the position just beyond the largest
> value in compstate[unambiguous_positions].
>
> Theoretically someone could puzzle out how to set it based on the
> smallest unambiguous position, but I'm just not that interested.

There is this widget, which might do something useful here?

cycle-completion-positions
After inserting an unambiguous string into the command line, the new
function based completion system may know about multiple places in
this string where characters are missing or differ from at least one
of the possible matches. It will then place the cursor on the posi‐
tion it considers to be the most interesting one, i.e. the one where
one can disambiguate between as many matches as possible with as lit‐
tle typing as possible. This widget allows the cursor to be easily
moved to the other inter‐ esting spots. It can be invoked repeatedly
to cycle between all posi‐ tions reported by the completion system.

-- 
Mikael Magnusson



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