From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Cancel zle -M on a keypress, use cursor keys
Date: Mon, 18 Jan 2016 09:34:57 -0800 [thread overview]
Message-ID: <160118093457.ZM6610@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVBTegpZQxfa4R+HjzWYTpeZKAUxLEARAEu7Zhat+QoKTw@mail.gmail.com>
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.
next prev parent reply other threads:[~2016-01-18 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 9:47 Sebastian Gniazdowski
2016-01-18 17:34 ` Bart Schaefer [this message]
2016-01-20 10:27 ` 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=160118093457.ZM6610@torch.brasslantern.com \
--to=schaefer@brasslantern.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).