Zsh Mailing List Archive
Messages sorted by:
Re: zle -U "$selected" doesn't handle (some?) multibyte characters
- X-seq: zsh-workers 37555
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: zle -U "$selected" doesn't handle (some?) multibyte characters
- Date: Sun, 10 Jan 2016 12:51:49 -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=npdvceXUUbl7ULBt4JV13T+zyxMiS5WMtZmSyssMFec=; b=wojrxZbmb8D8WnPl2leFsrdiwfEBFvBHAjcr5a/r9Ew0TzsVqvCjhJulItZFB8TDPN 45m2IenrAFbPdqg+/Z3c329DPbJKoZEl4GkP5QuHnRnj8R982Anbncl4wTKi/DHnnf2r B+t4ikhojner9tntpWXtiOvYn5841UkNl+veiTf12KLUCjCuCinA5zwuNVd8v/ueZlgH Gx8VS8uHtFGCCz9acCdnOMp4PSLqIgtsSu+6qGkR2ZNspRkK8sNSRN4b7AjpWwkNGZGP StKUuFb+dXI/yKMMRGZWQmX6RMyPXg64fgGnBhlSRePw76+SXmistZ/o19JDvf/TZsBN fP+g==
- In-reply-to: <CAKc7PVADMeoR-9CjdhNRePNe_2Ymiz77Go+xUtbirCU9fT01pA@mail.gmail.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVD7N_xaeXSZHB1Q4kmzayjiPA5BNTwkDM5mQF-Zj9SmFg@mail.gmail.com> <CAKc7PVAm0W7RJrK8-rZvuAF+jGZK-KNLjsjyaSy9PgaMYzKxemail@example.com> <CAKc7PVAPNZnNj+237eMSQgGtNBqaD8jLtHbBcG1+FTpX=Yvfirstname.lastname@example.org> <CAKc7PVADMeoR-9CjdhNRePNe_2Ymiz77Go+xUtbirCU9fT01pA@mail.gmail.com>
On Jan 10, 12:38pm, Sebastian Gniazdowski wrote:
} Is there any alternative to zle -U, to support older Zshells?
There's not really an alternative to "zle -U" because of the way the
input stack works, but with some effort you can work around the
metafication problem. You need to define a new key sequence for each
metafied character (similar to the way insert-composed-char works)
and substitute those into the string before pushing it with "zle -U".
If the only reason you need zle -U is for delayed-action self-insert
(no movement/command widgets involved), then you can define a widget
that manages a stack (array param) of values to be appended onto
LBUFFER, and each time you "zle -U" the key bound to that widget you
also put a new value on the stack array.
There might also be a way to work "bindkey -s" in there so that you
can "execute" the value from the top of the stack instead of just
appending it to LBUFFER, but I'm not going to try to figure that out.
Messages sorted by: