Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] complist interactive mode overwrites command line
- X-seq: zsh-workers 50413
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Andrea Manenti <andrea.manenti@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] complist interactive mode overwrites command line
- Date: Sat, 16 Jul 2022 11:11:53 -0700
- Archived-at: <https://zsh.org/workers/50413>
- In-reply-to: <8964126.CDJkKcVGEf@phy-nordri>
- List-id: <zsh-workers.zsh.org>
- References: <8964126.CDJkKcVGEf.ref@phy-nordri> <8964126.CDJkKcVGEf@phy-nordri>
On Fri, Jul 15, 2022 at 6:45 AM Andrea Manenti <andrea.manenti@xxxxxxxxx> wrote:
>
> On Wed, 4 Aug 2021 19:30:10 +0300 Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> > % zmodload zsh/complist
> > % bindkey '^I' menu-select
I don't know if this is also a new thing, but menu-selection also
makes the display pretty confused when stepping through with the arrow
keys if some of the entries are longer than will fit on the command
line without wrapping at the right margin. Try it in a directory with
a mix of very long and very short file names.
> > % MENUMODE=interactive
> > % touch test{1,2}
> > % : ; foobar
>
> > ^ 1. Type the above line in its entirety.
> > 2. Place the cursor before the ;
> > 3. Press Tab.
> > 4. Press Enter.
> > % : test1 bar
> > ^ Completion is written over existing buffer contents.
> I am also experiencing this bug, I'm running zsh 5.9.
The issue seems to be that interactive mode assumes you're going to
use it interactively -- as in, type a single character at a time until
you've reduced the set to only one match -- so it only adjusts the
buffer spacing on single keystrokes. When you accept with TAB (or
ENTER) domenuselect() is relying on do_single() to fix everything up,
but the state required by do_single() is not fully populated. I don't
know precisely what else is needed, though, and am out of time to
study it today.
> autoload -Uz compinit
> compinit
>
> setopt noautomenu
> setopt globcomplete
> bindkey '^i' complete-word
> setopt nolisttypes
>
> zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
> zstyle ':completion:*' menu yes select interactive
This configuration doesn't appear to matter to the underlying issue.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author