Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cancel zle -M on a keypress, use cursor keys
- X-seq: zsh-users 21164
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Cancel zle -M on a keypress, use cursor keys
- Date: Mon, 18 Jan 2016 09:34:57 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=rqOVroUNWt+CWxSKlQBPU6d/jUmuPMmSXDOcHMGUUmQ=; b=MviMm2r2rsKJc9ONw2QW5XFqZ/fPjt4w3O1tV7Vt6StFr6Ckzy7Upf9/BTciFsmoTg msMGG3Qq+ab4TKvVN6HpcAp1W4eoXFw64AcjKmo3eoBfzBd9MhsDVXZjzy0EXEQ1mneB QHo1TNtVgrJGm2vpddV9wHLr9F3QQl59lRQbRdhSfWwpdMR9sgEukUUJO/E7BVwFktHJ wQ4MRoer7AgCqd17g6eBTa9mGnaplmeOdEm0ZHdbYVYXOwhHN5KiZEY1wF5fAIloNEjz tOflIbDGFc73/NgDmAjigIJmOTSsdeJ18ysREPEFGYWu3i0K1p8mKN2e21DlsdbQzQxB 7LPQ==
- In-reply-to: <CAKc7PVBTegpZQxfa4R+HjzWYTpeZKAUxLEARAEu7Zhat+QoKTw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author