bug-bash
[Top][All Lists]
Advanced

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

no TIPS on COLORS in the PROMPT in the DOCS


From: Dan Jacobson
Subject: no TIPS on COLORS in the PROMPT in the DOCS
Date: 16 Apr 2001 09:10:13 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

As Zippy says: I didn't find any TIPS on how to put COLORS in the
PROMPT in the DOCS.

cd /usr/share/doc/bash-doc-2.04/
grep -n -i -e color * */* */*/* /dev/null
article.ps:1051:(ferent colors or in standout mode.)-.25 F 1.532(...
article.txt:827:to print characters in different colors or in standout mode.

I mean there ought to be examples given.  I'm OK with my quick hack

case z-$TERM in z-rxvt) my_color_on="\e[01;35m" my_color_off="\e[00m"
   test `id -u` = 0 && my_color_on="\e[01;45m";;esac
    #don't export the color stuff though

PS1="$my_color_on\$?\W\\$""$my_color_off "

But you might want to throw in some examples from the pros.

Maybe add some level of abstraction so users don't deal with raw
terminal codes...
-- 
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.



reply via email to

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