red_prompt.bash 185 Bytes
Newer Older
1
2
3
4
5
6
7
8
# colour the red prompt

if [ $(id -u) -eq 0 ];
 then # you are root, set red colour prompt
   PS1="\[$(tput setaf 1)\]\u@\h:\w# \[$(tput sgr0)\]"
 else # normal
   PS1="[\u@\h:\w]"
fi