Zsh Mailing List Archive
Messages sorted by:
Re: Using menu completion after predict
- X-seq: zsh-workers 42738
- From: David Woodfall <dave@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Using menu completion after predict
- Date: Mon, 30 Apr 2018 20:54:11 +0100
- In-reply-to: <20180430162644.GG24131@blackswan>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180430162644.GG24131@blackswan>
On Monday 30 April 2018 17:26,
Dave Woodfall <dave@xxxxxxxxxxxxxx> put forth the proposition:
I've been experimenting with the predict completer and it works well.
There is something that I haven't been able to figure out yet though.
When using, say, cdr with menu complete, when I first type 'cdr '
predict brings up the last match in history. Let's say:
I press tab for menu complete to activate but the '4' stays on the
command line, which means that after selecting an entry from the
list I now have two numbers, say:
cdr 4 1
Of course cdr will give an error if I try to execute the command.
Is there a way of clearing the prompt line when certain menu
completions activate, like cdr, so that this doesn't occur?
I know I can use a bind to kill to eol, but I'd rather have some
filter or completion option for ':completion:*:*:cdr:*:*' that would
clear to the end of the line before entering the selection menu.
These are my current settings:
zstyle ':completion:*' menu select yes=long-list select=long-list
zstyle ':completion:*' completer _complete _match _approximate \
_correct _expand _prefix
zstyle ':completion::prefix:*' completer _complete
zstyle ':completion:*:*:cdr:*:*' menu selection
zstyle ':completion:*:*:cdr:*:*' completer _complete
zstyle ':completion:predict:*' completer _history
zstyle ':predict' menu select no
zstyle ':predict' toggle true
zstyle ':predict' verbose true
zstyle ':predict' cursor complete
Any help is greatly appreciated.
Well I've made a workaround that is OK so far.
if [ "$KEYMAP" = "vicmd" ]; then
Probably not the proper solution, but it saves deleting the command line
Messages sorted by: