Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

digraph breaks out of history search



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