Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] compinit interactive mode overwrites command line
- X-seq: zsh-workers 53593
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: Andrea Manenti <andrea.manenti@xxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] compinit interactive mode overwrites command line
- Date: Mon, 12 May 2025 13:58:45 -0700
- Archived-at: <https://zsh.org/workers/53593>
- In-reply-to: <CAHYJk3SG76rK+bZwB7y8qkM2LuA0S77mmRfH0+J+1iTjYtMp8g@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <iJtTqY193x0XgWjkT4UpOscJ89ZO5F-auk031rZ6pvhen9BfdP_OP3LcpEKJANzI82SBeIF_IoyQPcOWkpOQH5428NSXm-qcJZej_AlwTUA=@proton.me> <CAHYJk3SG76rK+bZwB7y8qkM2LuA0S77mmRfH0+J+1iTjYtMp8g@mail.gmail.com>
There's a long thread about this starting at workers/50412. It
interacts with a thread from Marlon starting at workers/49242.
On Mon, May 12, 2025 at 9:40 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> This change appears to fix it, but I just looked for MM_INTER in
> complist.c and tried poking at it until something changed, so it's
> very possible this breaks something else.
All of my attempts focused on getting minfo.len / minfo.cur /
minfo.insc to agree with the actual state of the command line before
entering the code shared with do_single().
> * In interactive completion mode we don't insert
> * the completion onto the command line, instead
> * we show just what the user has typed and
> * the match so far underneath (stored in "status").
I'm not sure this comment is definitive -- if you hit TAB and then
continue interactive completion, the unambiguous prefix will have been
inserted into the command line without the user typing. Interactive
mode only updates state on self-insert, which is how things get out of
whack when you invoke completion another way.
In short, I'll be very relieved if this patch actually fixes all the
cases, and not just one special case.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author