[Gllug] Coloured bash prompt

Christian Smith csmith at micromuse.com
Fri Apr 23 13:17:24 UTC 2004


On Thu, 22 Apr 2004, Tethys wrote:

>
>Pete Ryland writes:
>
>>So, perhaps it's better to use setaf instead.  Note, however, that this uses
>>BGR order as per ANSI-sequence colours.
>
>Potentially true, but AIX[1] accepts both setf and setaf, and ignores
>them both:
>
>	askanarsp01:~% uname -a
>	AIX askanarsp01 3 4 0045F3CA4C00
>	askanarsp01:~% tput setf 3 | wc
>		   0       0       0
>	askanarsp01:~% tput setaf 3 | wc
>		   0       0       0
>
>Tet
>
>[1] Solaris behaves the same, but it works fine on Tru64. I had initially
>    thought it would be all SVR4 derived terminfos, but I guess DigiPaquard
>    have fixed theirs.

HPOX also does not handle setf or setaf, so it may be better to simply
stick with the vt100 escape sequences for color, if you can assume you're
using vt100 compatible terminal all the time.

Still, tput looks really useful, and I've learned something new today.
Cheers:)

Christian

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list