Re: Making PS1 to appear bold in ksh

From: ajay (ajay_kumarsingh_at_yahoo.com)
Date: 01/30/04


Date: 29 Jan 2004 21:35:58 -0800

Ed Morton <morton@lsupcaemnt.com> wrote in message news:<bvb7il$enf@netnews.proxy.lucent.com>...
> Dan Rawson wrote:
> > ajay wrote:
> >
> >> Hi All,
> >>
> >> How to make PS1 to appear bold in ksh? I'm using solaris and xterm.
> >> Here is my PS1
> >>
> >> export PS1='$HOST:${PWD}>$ '
> >>
> >> and my PS1 results in
> >>
> >> /user/aksingh
> >>
> >> i want it to appear bold
> >>
> >> Tx
> >

Tx all both are working :)
> > You have to put escape sequences around the text:
> >
> > echo ESC[1m${PATH}ESC[m
>
> or use "tput bold" to switch to bold, then "tput rmso" to switch back:
>
> echo `tput bold`$PATH`tput rmso`
>
> I have no idea which of those solutions is the more portable or what
> other things you need to consider when picking the method - just
> mentioning the alternative...
>
> Ed.