Zsh Mailing List Archive
Messages sorted by:
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:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.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
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
tungsten% <- <ctrl-R><ctrl-K>Pd
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
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.
Messages sorted by: