Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Using menu completion after predict
- X-seq: zsh-workers 42737
- From: David Woodfall <dave@xxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: Using menu completion after predict
- Date: Mon, 30 Apr 2018 17:26:44 +0100
- 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>
- Mail-followup-to: Zsh Workers <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi
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:
crd 4
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.
-Dave
Messages sorted by:
Reverse Date,
Date,
Thread,
Author