From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Mikael Magnusson <mikachu@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 20:43:07 +0200 [thread overview]
Message-ID: <CAKc7PVBEAuvgYU91QzP9SXEB=szKTTf7afmP6dXwzP4VdU-Odg@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3TLF1Qh75LPh3zOBNFg43=+NGTCApE+_jvJhX6WCj5gqQ@mail.gmail.com>
On Wed, 10 Jul 2019 at 18:30, Mikael Magnusson <mikachu@gmail.com> wrote:
> This doesn't do what you think it does.
> ...
> "any other zle function not listed leaves menu selection and
> executes that function.
I'm trying to solve this with a function that deploys a code to be
evaluated in zle context (the zle-F boomerang trick):
https://gist.github.com/psprint/f2a0db07cc80351e19e30378c6eaa779
function double-accept { echo 1 >> /tmp/reply; deploy-code "BUFFER[-1]=''"; }
zle -N double-accept
bindkey -M menuselect ' ' double-accept
However, I don't even get the message in /tmp/reply. Anyone knows why?
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
prev parent reply other threads:[~2019-07-10 18:44 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
2019-07-10 18:43 ` Sebastian Gniazdowski [this message]
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='CAKc7PVBEAuvgYU91QzP9SXEB=szKTTf7afmP6dXwzP4VdU-Odg@mail.gmail.com' \
--to=sgniazdowski@gmail.com \
--cc=mikachu@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).