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

Re: Cancel zle -M on a keypress, use cursor keys



On Jan 18, 10:47am, Sebastian Gniazdowski wrote:
}
} I've written a Zle completion widget that edits BUFFER and proposes
} matches via zle -M. I want to cancel the zle -M message when user does
} anything different than browsing completions (done with Alt-h and
} Alt-H). How to accomplish this?
[...]
} I would also want to catch cursor keys and use them for browsing the
} matches. How to do this, should I somehow use bindkey locally in the

I think you want to invoke "zle recursive-edit" with its own private
keymap.  Refer to Functions/Zle/read-from-minibuffer for an example;
you may even be able to use read-from-minibuffer directly.

The other way is to use "read -k" in in a loop, for which the most
detailed (though now fairly old and probably improvable) example is
Functions/Zle/incremental-complete-word.



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