zsh-workers
 help / color / mirror / code / Atom feed
* Strange escape codes in prompt
@ 2008-09-22 22:47 Casper Gripenberg
  2008-09-23  8:44 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Casper Gripenberg @ 2008-09-22 22:47 UTC (permalink / raw)
  To: zsh-workers


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:

^[[1m[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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Strange escape codes in prompt
  2008-09-22 22:47 Strange escape codes in prompt Casper Gripenberg
@ 2008-09-23  8:44 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2008-09-23  8:44 UTC (permalink / raw)
  To: zsh-workers

On Tue, 23 Sep 2008 01:47:28 +0300
Casper Gripenberg <casper.gripenberg@kotiportti.fi> wrote:
> Hi. I've long been wondering why I from time to time see
> a spurious "%" on my line before the prompt.

This is the effect of the option PROMPT_SP described in the manual.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-23  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 22:47 Strange escape codes in prompt Casper Gripenberg
2008-09-23  8:44 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).