[ale] $PS1 stuff

David S. Jackson dsj at dsj.net
Sat Apr 10 16:57:13 EDT 1999


Hi,

I was trying to customize my $PS1 variable a little bit with some ANSI color
escapes, and I find that I can do it with bash 2.0.x but can't quite do it
with bash 1.4.7.  At least not the same way.  Two questions:

first:  PS1="\[\e[1;31m\e \e[47m\] \d \@ BASH \V in \w \[\e[1;33m \e[40m \]
\n[\u@\h \W]\$ "  seems to work fine with BASH 2.0, but not with 1.4.7.  I
tried the ^[ escapes, and that didn't seem to work either.  I've tried
TERM=xterm, TERM=xterm-color.  No go either way.  Any ideas for getting
something like this to work with Bash 1.4.X?

second:  I'd like to add nifty ASCII characters to the PS1 line, but I have
to enter their octal values as \nnn where "nnn" = the octal value of the
ASCII character in question.  I found an old table with decimal and hex
equivalents, but how do I convert them to octal for the PS1 variable?

TIA!

--
David S. Jackson                           http://www.dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
No electrons have been harmed or mistreated in bringing this 
message to you.






More information about the Ale mailing list