From: David Woodfall <dave@dawoodfall.net>
To: Zsh Workers <zsh-workers@zsh.org>
Subject: Using menu completion after predict
Date: Mon, 30 Apr 2018 17:26:44 +0100 [thread overview]
Message-ID: <20180430162644.GG24131@blackswan> (raw)
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
next reply other threads:[~2018-04-30 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 16:26 David Woodfall [this message]
2018-04-30 19:54 ` David Woodfall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180430162644.GG24131@blackswan \
--to=dave@dawoodfall.net \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).