Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
digraph breaks out of history search
- X-seq: zsh-workers 36893
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: digraph breaks out of history search
- Date: Mon, 19 Oct 2015 01:10:03 +0000
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201408; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Subject:To:From:Date; bh=Mg6IPjbVIypDp/Q0Ax0wQ5tkbqfpVpmkDkHLZKzNHas=; b=k/Z5c/XKWOjAI65TnJzkPa6m6E mJqIKs42BZc095o5Sjtd9/W1n+GDObFQREK5JGlP0q1i9drl/OjFqaS/OyJ9BCliSjFjdSvtmfR07 24lCOdKJwRSw/Md1zuoPLoN8peqsx9YwZJfCVZ/tiYYBsU5W8EfqO255f5+XpOpWrcBT5e03aF/Fb LMGddKUeVbh4YKLbgouQl9JQxIhW;
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
I can see what's happening, and why, but don't have good thoughts about
how to solve it. Perhaps someone else might?
% zsh -f
tungsten% echo $ZSH_VERSION
5.1.1
tungsten% autoload insert-composed-char ; zle -N insert-composed-char
tungsten% bindkey -e
tungsten% bindkey '^K' insert-composed-char
tungsten% echo £ <- entered with <ctrl-K>Pd
£
tungsten% echo foo
foo
tungsten% <- <ctrl-R><ctrl-K>Pd
becomes:
tungsten% £
Instead of searching back through history for the digraph-composed
character, we break out of history search and the digraph character is
inserted into the command-line immediately.
I think that this is because the function insert-composed-char is
using:
LBUFFER+=$ochar
and this isn't working with the mini-buffer.
Am I on the right path?
Short of diving into the zle internals, is there a way around this? I
can't see something like `self-insert` but taking a character parameter,
can't see a way to manipulate the input character before calling
`self-insert` (since `$KEYS` is read-only), can't see anything relevant
in zsh/parameter ... I'm stuck.
Thanks,
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author