Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Space in interactive menu select
- X-seq: zsh-workers 43116
- From: Thayne <astrothayne@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Space in interactive menu select
- Date: Sun, 1 Jul 2018 00:25:45 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CR4we0wbJ72tslw/+gREEcnHnthqc7AW/beE4ciAtS0=; b=KYV2LATGKXWDg1Ai3qalbH6pW5fTu5aU6lXDmZ5QZULLG/Bj0UaolD2JNLmRteibmK 6S60eQPTwIzwOYI/kAOhzXBRGSjnqiNy/eJRiesSuyzIGBurJF0uOH+GY2OcrgiOTNW+ bGaVPSMeNnJxwD6I3EE2lx8wx4rSqpM7/OGmRICqjlY8y8kFinDIjbzVxEQDtztGUVZs iWcEdbH8StkKxfaueMFCQ+4TfzZMB/6dI6f/Wdea6CyXcgfOdwKrmzyELQcxCpqcVtSx KFPVFbZdT6/+C6iutQZXcMcxsYMZcePuJvCGybKu08Zq0Kxt5WHJFxL+E2KoHegmXKTU pJLw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
With the following (minimal) .zshrc:
zmodload zsh/complist
zstyle ':completion:*' menu select yes interactive
autoload -Uz compinit
compinit
If I finish the word that is being completed myself, then press space, it
starts completing for the next word, but if I then accept a completion for
that word, it then replaces *both* words that I typed during completion.
https://asciinema.org/a/189304 shows an illustration of this.
This is very unexpected behaviour. I would expect pressing a space during
interactive menu selection to stop the current completion and insert a
space after what has been typed so far. Or at least that is how I would
like it to happen, but as far as I can tell there isn't a way to accomplish
that.
I have tried using `bindkey -M menuselect ' ' self-insert`, but that
doesn't make a difference. `bindkey -M menuselect ' ' accept-line` makes it
so a space is treated the same as enter, which is less surprising, but is a
little annoying if I start the completion, realize that the completion
doesn't have the option I actually need, type the real option, then press
space.
I've also tried creating a custom zle widget that calls `zle send-break`
and then `zle self-insert`. And bind space to that widget, but that doesn't
work either (it looks like it acts the same as `accept-line`.
This seems like a bug to me.
Thayne McCombs
Messages sorted by:
Reverse Date,
Date,
Thread,
Author