[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Colour prompt fowls line wrapping (2.04.11(1))

From: Simon A Watts
Subject: Colour prompt fowls line wrapping (2.04.11(1))
Date: Wed, 09 May 2001 17:22:44 +0000
User-agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22 i686; en-US; rv:0.9) Gecko/20010507

Using a new installation of RH 7.0, which has Bash 2.04.11(1) (bash --version).

I have tried setting my PS1 prompt to display in white, so that it is obvious where program output starts:

PS1='ESC[1;address@hidden \W]\$ESC[0m ' Where ESC is typed CTRL-V,ESC, or character 0x1B. (This could also be [\033?).

This has the effect of setting the font for the prompt to bright white, on my usual green-on-black console.

This screws the wrapping of the command line:

1. Wrapping starts well before the right hand edge of the terminal (is it counting the control characters?). 2. When it wraps, it performs a 'return' but not a 'line feed'. The cursor goes to the start of the line and overwrites (including the prompt). 3. If I now left-arrow (or backspace) along the command line, it does perform an "inverse-return" and "inverse-line-feed", so the cursor is now on the line *above* where I started. Things get pretty confusing from this point on...

This is a great pity, as I rather like the command prompt to be outstanding, as I can clearly see where the boundaries between command o/p are.


[I am not on this mailing list, and cannot access the news group from here (was using deja), please CC replys to me]

Simon A Watts
Software Engineer
Marconi Medical Systems
tel: +44(0) 1252 747 311

reply via email to

[Prev in Thread] Current Thread [Next in Thread]