Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Pasting UTF-8 characters with bracketed-paste-magic seems broken in 5.1
On Thu, 10 Sep 2015 12:29:53 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Oh, but "read -k" is always going to read from the terminal? It does
> not use the "zle -U" pushback? In which case we'd have to loop on
> "zle .read-command", even with the [[:INCOMPLETE:]] pattern.
>
> Urk. I think read-command is going to have to know multibyte ...?
I don't think that's a problem. The whole shell is built around the
requirement that multibyte characters are an 8-bit extension of ASCII,
else it would need rewriting from the ground up. So, even if it's not
UTF-8, the chraracter set needs to have the property that bytes in a
multibyte character are not ASCII characters, or to put it another way
every byte is equivalent as far as .read-command is concerned. So I
think the code I posted using [[:INCOMPLETE:]] should be the core of a
reasonable solution.
Note that if we do upgrade read-command, it's future proof, since then
we never get something starting with [[:INCOMPLETE:]] (though it may in
principle start with [[:INVALID;]]).
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author