-   Linux - Newbie (
-   -   Colored prompter (

spank 08-25-2003 02:15 PM

Colored prompter
I guess this is kinda` lame question... but tell me how can I make my shell look better... change the ls colors or have a colored promter. I have to change the shell or I can costumize bash to do what I want.
thx... and i`m sorry for my english.

darthtux 08-25-2003 02:25 PM

You have add to .bashrc. After your done editing the file make sure you
source .bashrc
On you can find a Bash Prompt HOWTO

Here is the code I use:

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='[\w]\$ ';;
PS2="[$(date +%I:%M) \u \w]\$ \[\033]0;\u \w\007\]" ;;



All times are GMT -5. The time now is 04:02 AM.