Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problems with 4.3.4 and Tru64
- X-seq: zsh-workers 23429
- From: Jordan Breeding <jordan.breeding@xxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: problems with 4.3.4 and Tru64
- Date: Fri, 11 May 2007 09:23:13 -0700
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <200705110928.l4B9Sobe019086@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.OSF.4.64.0705101117330.479844@xxxxxxxxxxxxxxxx> <20070510175541.GA67479@xxxxxxxxxxxxxxxxxxxx> <alpine.OSF.0.99.0705102221080.265865@xxxxxxxxxxxxxxxx> <20070510222647.GA45037@xxxxxxxxxxxxxxxxxxxx> <200705110928.l4B9Sobe019086@xxxxxxxxxxxxxx>
On Friday, May 11, 2007, at 04:29AM, "Peter Stephenson" <pws@xxxxxxx> wrote:
>Phil Pennock wrote:
>> > > If these display fine, then multibyte is working and parts of zle are
>> > > working; the problem will be in input processing. If these don't
>> > > display, then the problem's not in the input processing.
>> >
>> > Touche, that works!
>> >
>> > Now, how to fix input processing?-)
>
>The fact they display doesn't tell you very much. You also need to
>check that once you've got them on the command line they behave like a
>single character. The easiest way is just to move the cursor and check
>it doesn't go to far (which it will if doesn't recognise the two bytes
>as a single character).
>
>If that's really working, input processing is quite involved to check.
>The key function for this is getrestchar() in Src/Zle/zle_main.c. This
>should recognise the first byte is an incomplete character and the
>second byte completes it. I don't think this an easy way to avoid
>debugging the insides.
>
<snipped>
Hello,
I have been following this thread as it interests me since I have had trouble getting multibyte to work the way I would expect on OS X. This thread inspired me to dig a little deeper since I can always see the characters, but with multibyte on echo/printf didn't seem to like the combined characters, and with multibyte off the line editor can't keep straight that it is one character. I will file a bug report with Apple to turn on multibyte in zsh now since in zsh 4.3.4 it seems to work fine. The other problems I was having were caused by preexec(). I had some print() statments in precmd() and preexec(). precmd() and chpwd() seem to have no effect on whether multibyte works or not, but this preexec():
preexec() {
print -Pn "\e]2;%n@%m %0~ (%30>...>${1}%>>%)\a"
}
causes echo/print to misbehave.
My test case was to do `echo h<combined character>lp` where the combined character is either <option-u>e or <ctrl-x k>e:
with the preexec enabled I get:
<combined character>h<combined character>lp
as the output, without it it just echoes exactly what it should. So I think for the most part my problems are solved now. It would be nice to still be able to use preexec, but I assume that hopefully that bug can be fixed in the future.
Jordan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author