From: Mikael Magnusson <mikachu@gmail.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: In menu-select, how to make accept-line do not put a space
Date: Wed, 10 Jul 2019 18:30:23 +0200 [thread overview]
Message-ID: <CAHYJk3TLF1Qh75LPh3zOBNFg43=+NGTCApE+_jvJhX6WCj5gqQ@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVBewq9Z7ZN5kn6fVVinQpaUTBFODzZUysB31WN5t1orbA@mail.gmail.com>
On 7/10/19, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Hello,I'm using the following setup:
>
> zstyle ':completion:*:*:*:default' menu yes select search
> function double-accept { accept-line; accept-line; }
> zle -N double-accept
> bindkey -M menuselect ' ' double-accept
>
> It works fine, but it puts a space after pressing the space to accept
> an entry. I would like it to not do it. How to accomplish this?
This doesn't do what you think it does.
"Note that the following always perform the same task within the
menu selection map and cannot be replaced by user defined widgets, nor
can the set of functions be extended"
..list of widgets..
"any other zle function not listed leaves menu selection and
executes that function. It is possible to make widgets in the above
list do the same by using the form of the widget with a `.' in front.
For example, the widget `.accept-line' has the effect of leaving
menu selection and accepting the entire command line."
--
Mikael Magnusson
next prev parent reply other threads:[~2019-07-10 16:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 15:52 Sebastian Gniazdowski
2019-07-10 16:30 ` Mikael Magnusson [this message]
2019-07-10 18:43 ` Sebastian Gniazdowski
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='CAHYJk3TLF1Qh75LPh3zOBNFg43=+NGTCApE+_jvJhX6WCj5gqQ@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=sgniazdowski@gmail.com \
--cc=zsh-users@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).