Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: In menu-select, how to make accept-line do not put a space



On Wed, 10 Jul 2019 at 18:30, Mikael Magnusson <mikachu@xxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author