colored prompter/shell
I tried to make my promter colored by adding the next code to the .bashrc file
function myprompt{
local GRAD1=`tty|cut -d/ -f3`
local COLOR1="\[\033[1;34m\]"
local COLOR2="\[\033[0;34m\]"
local COLOR3="\[\033[1;36m\]"
local COLOR4="\[\033[0m\]"
local COLOR5="\[\033[1;32m\]"
local COLOR6="\[\033[0;32m\]"
case $TERM in
*term* | rxvt )
PS1="$COLOR1[$COLOR3\$(date +%I:%M) $COLOR3\u \w$COLOR1]$COLOR3\$$COLOR4 \[\033]0;\u \w\007\]" ;;
*)
PS1="$COLOR1[$COLOR3\$(date +%I:%M) $COLOR3\u \w$COLOR1]$COLOR3\$$COLOR4 "
#PS2="$COLOR2-$COLOR1-$COLOR3-$COLOR4 " ;;
#PS2='[\w]\$ ';;
PS2="[$(date +%I:%M) \u \w]\$ \[\033]0;\u \w\007\]" ;;
esac
}
myprompt
and when I try to open the new shell it gives me the next error:
# bash: /home/spank/.bashrc: line 11: syntax error near unexpected token `local'
# bash: /home/spank/.bashrc: line 11: `local GRAD1=`tty|cut -d/ -f3`'
PS: how can I change the directory ls color.. I have RH9 and the blue color doesn't read very well
|