LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Colour Prompts

[ILUG] Colour Prompts

John P. Looney jplooney-ilug at online.ie
Fri Dec 17 14:21:00 GMT 1999


On Fri, Dec 17, 1999 at 01:58:42PM +0000, Colm Buckley mentioned:
> Look.  Grr.  This is the Wrong Thing.  The Unix terminal interface has
> been carefully crafted over the past 30 years to be independent of any
> particular terminal type; with thousands of hours of effort going into
> libraries like terminfo and curses.  Putting terminal-specific codes
> into your prompt (or elsewhere) is gratuitous breakage...

 Well said. However, if your prompt is lucirously complex, and you've
forgotten how it works (like me), you can live with just having:

GRAD1='\333\262\261\260'
GRAD2='\260\261\262\333'
YLOBRN='\033[01;33;43m'
WHTBRN='\033[01;37;43m'
REDBRN='\033[00;31;43m'
REDBLK='\033[00;31;40m'
BLKRED='\033[00;37;41m'
PPLBLK='\033[01;35;40m'
WHTBLK='\033[01;37;40m'
NONE='\033[00m'
E='\['
R='\]'
PS1=']2; \u on \h in \w '${E}${WHTBRN}'   '${R}${E}${REDBRN}${GRAD2}${BLKRED}' \u : \h : \w/ '${REDBLK}${GRAD1}${WHTBLK}${R}' \d \t '${E}${NONE}' \n'${PPLBLK}${R}'\h ['${?}'] '${E}${NONE}${R}' '

 And doing "PS1='% '" if it breaks :)

Kate

Kate

-- 
Microsoft. The best reason in the world to drink beer.
http://www.redbrick.dcu.ie/~valen




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell