RE: terminal command line weirdness

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

 



Satish:

I did a little digging too, now that I knew what to look for, and came up
with http://www.javacommerce.com/tips/linux/all/00000080.html amongst other
sites also offering similar information. A bit of man tput and man terminfo
also helped.

Long story short, I changed my PS1 as follows:
SAVE_CRS=`tput sc 2> /dev/null`
RESET_CRS=`tput rc 2> /dev/null`
CLOCKPOS=`tput cup 0 $(($HZ-10)) 2> /dev/null`
FOREG=`tput setaf 1 2> /dev/null`
ALT_FOREG=`tput setaf 3 2> /dev/null`
BACKG=`tput setab 0 2> /dev/null`
NORMAL=`tput sgr0 2> /dev/null`
BOLD=`tput bold 2> /dev/null`
 
PS1="\[${BOLD}${FOREG}\]\u@\h \W\\$\[${NORMAL}\] "

unset SAVE_CRS
unset RESET_CRS
unset CLOCKPOS
unset FOREG
unset ALT_FOREG
unset BACKG
unset NORMAL
unset BOLD

I'm not using most of the defined parameters, but I'm keeping them around
for reference.

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 
SPAMstomper Protected E-mail
www.stomperware.com 




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux