On Mon, Jun 13, 2005 at 05:15:24AM -0400, Thomas E. Dickey wrote:
> On Mon, 13 Jun 2005, Paul van Tilburg wrote:
> 
> >Package: ncurses-base
> >Version: 5.4-5
> >Severity: normal
> >
> >Hi,
> >
> >After I updated ncurses-base to 5.4-5 and restarted my terminal emulator, I
> >got parts of escape sequences in my zsh prompt.  Zsh seems to insert such
> >escape sequences before all prompts and messages, so I have "[27m" strings
> >all over the place, of which zsh doesn't know that they aren't displayed so
> >everything gets misaligned and messy.
> 
> That sounds like the terminfo was updated but not the library.
> But I thought both went together.

I use zsh too, but I only use the xterm hard status sequences in my
prompt, not the color codes.  If I borrow your prompt, then I can see a
little bit of weird stuff going on, but not the problem you described. 
I assume the literal ^[ in your PS1 string is supposed to be ESC, since
zsh doesn't seem to interpret it otherwise?

Here's what it writes out for PS1="[EMAIL PROTECTED] ":
[EMAIL PROTECTED] ESC[K

(Thomas, you know what would be really handy?  A mode like infocmp -i,
which took an arbitrary string and analyzed it in terms of some
terminfo.)

ESC[0m doesn't come from anywhere in the xterm terminfo, as far as I
can see, nor in the termcap interpretation of it.  Might just be
misreading.  The third occurance comes literally from Paul's PS1
string, but the first two from zsh.  I assume this is supposed to be
the first part of sgr?

[EMAIL PROTECTED]

The stray } is because %{ matches with %}.  Otherwise no visual
glitches at all - IN THE PROMPT.  However, ls<tab> puts the cursor way
off in the wrong place.  Zsh's notion of the width of the prompt string
is all wrong.  Specifically, it thinks it is twelve characters longer
than it is, which corresponds exactly to the three ESC[0m sequences.

My guess is a bug in zsh.  It sounds like this is not the same as the
bug that Paul's seeing, though.  That would be two problems:

1) My own stupid fault; I messed up the upload so it has not autobuilt
for other architectures, including PowerPC.  I will fix that now.

2) The dependencies in ncurses-base do not prevent using it with the
old library; is this compatibility problem big enough to justify that
(annoying) change?

That still leaves the zsh prompt width bug, which shows up on i386 with
all the packages installed.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to