On 11/02/10 17:16, John wrote:
On 11/02/10, Jon Dowland ([email protected]) wrote:
| ...
| I've never met a bash that displays anything other than '#'
| for '\$' in PS1. Can you give an example of one that does?
From .bashrc:
# root; red
#export PS1='\[\033[0;31...@\w# \]'
Very useful thread, thank you all.
So, I've set my PS1 in /root/.bashrc as suggested.
From my user shell, I do 'su', and the prompt, and everything following
is in red - good!
CTRL-D returns me to my user shell, and everything is still red - bad!
So, I figured that export PS1='\[\033[0;31...@\w$\033[0;30m \]' would
return it back to black after the prompt - which it does, and I can live
with that, but ideally, I'd like to save away the present colour, and
restore it.
Can anyone suggest how to do that?
PS - where are these escape sequences documented, please?
--
Tony van der Hoff | mailto:[email protected]
Buckinghamshire, England |
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]