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

Strange escape codes in prompt




Hi. I've long been wondering why I from time to time see
a spurious "%" on my line before the prompt. Normally this
% character is not visible, but sometimes when I suspend
a program or fg a program it pops up on a line. It
always seemed a bit weird.

So I completely reset my prompt from all colorization
and geeky extra-info:

PS1="PROMPT: "

And then I took a look at the raw output of zsh, expecting
to see nothing but a newline and "PROMPT: " being outputted.

But this is what I got:

[4m[7m%[m[1m[4m[0m[4m[0m[m[m[JPROMPT:

Each '[' being prefixed by an escape. And lo..there is
the mysterios "%" embedded into that sequence.

Now my question is where do all these escapes come from?
Is that normal and/or necessary? What do they do?

Even if I did
TERM=dumb
..the mysterious % still remained in the output.

Running zsh 4.3.4 on Ubuntu 8.04.

Thx.

Casper






Messages sorted by: Reverse Date, Date, Thread, Author