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

Re: [PATCH 1/3] Fix _prefix insertion logic



On Fri, May 5, 2023 at 2:44 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> This solves the following problems in the _prefix completer:
> - The old code had logic for dealing with compstate[unambiguous] that
>   was unnecessary. It works fine without it.
> - Because of this logic, if a widget set compstate[insert]=1 after
>   calling _main_complete, an `x` was left after the completion on the
>   command line.
> - If the same widget also set `compstate[to_end]=`, then instead, the
>   last character of the inserted completion would be treated as an
>   autoremovable suffix, with the actual suffix being inserted to the
>   line as a normal character.
> - After inserting a completion, the cursor would move to the end of the
>   entire current word on the command, not the end of word that was
>   inserted. This is not what you want with _prefix, since you are trying
>   to complete a word _before_ the one on the command line, after which
>   you usually want to insert a separator, such as a space or slash,
>   before the next word.
>
> Discussed in workers/51641.
> ---

Any further comments on this patch? Will it be committed?




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