underlined text in PS1 variable?
hi,
I want to underline my user & hostname in the PS1 variable, but I cant seem to do it. I know that my Xterm can underline text normally, because when I pass Xterm the '+nul' option, then do this: Code:
tput smul; echo underlined text; tput sgr0 here is my PS1 variable: Code:
PS1='u @\h[\033[0m\]\[\e[m\]\[\033[1;33m\]\w \[\033[0m\]# ' |
Hi,
Try Code:
PS1='\[\033[0m\]\[\033[4;33m\] \u@\h \[\033[0m\]\w# ' Or you can try doing the following. First define a few variables: Code:
BLACK=$(tput setaf 0) Code:
PS1="${BRIGHT}${UNDERLINE}${RED}\u@\h${WHITE}${NORMAL}$ ${PWD}$ " Ian |
thanks Ian, that looks a far eaier way to do it.
|
All times are GMT -5. The time now is 09:07 AM. |