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

Re: Colors



On Thu, 6 Aug 1998, Remco van de Meent wrote:

> On Thu, 6 Aug 1998, Marcus Brinkmann wrote:
> 
>  :   set_prompt ()
>  :   {
>  :     local SAVE_CRS=`tput sc 2> /dev/null`
>  :     local RESET_CRS=`tput rc 2> /dev/null`
>  :     local CLOCKPOS=`tput cup 0 90 2> /dev/null`
>  :     local FOREG=`tput setf 6 2> /dev/null` 
>  :     local ALT_FOREG=`tput setf 3 2> /dev/null`
>  :     local BACKG=`tput setb 0 2> /dev/null`
>  :     local NORMAL=`tput sgr0 2> /dev/null`
>  :     local BOLD=`tput bold 2> /dev/null`
>  : 
>  :     PS1="\[${NORMAL}${SAVE_CRS}${CLOCKPOS}${FOREG}${BACKG}${BOLD} \@ ${RESET_CRS}${BOLD}${ALT_FOREG}\]\u\[${NORMAL}\]@\h:\w\$ "
>  :   }
>  :   set_prompt
> 
> Doesn't this execute those tput's everytime a new prompt has to be generated
> (i.e. after every command) ?
> 

I dont think it does, the function sets the variables, then sets the PS1
variable to the results of those tput's. That right Marcus??

                       Michael Beattie (mickyb@es.co.nz)

               PGP Key available, reply with "pgpkey" as subject.
 -----------------------------------------------------------------------------
               Def: Password: The nonsense word taped to the CRT.
 -----------------------------------------------------------------------------
                Debian GNU/Linux....  Ooohh You are missing out!



--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: