bashrc

NORMAL="\[\e[0m\]"


BLUE="\[\e[0;34m\]"
WHITE="\[\e[0;37m\]"
MAGENTA="\[\e[0;35m\]"
GREEN="\[\e[0;32m\]"


BRIGHTBLUE="\[\e[1;34m\]"
BRIGHTWHITE="\[\e[1;37m\]"
BRIGHTMAGENTA="\[\e[1;35m\]"
BRIGHTGREEN="\[\e[1;32m\]"


# Find out if we are root
if [ $UID -eq 0 ] ; then
   # The # character serves as an extra reminder that I am root
   SYM='#'
else
   SYM='>'
fi


# Define the actual prompt
# This is split up for easier reading within this book
P1="$MAGENTA$SYM$BRIGHTMAGENTA-$BRIGHTBLUE($WHITE\u$MAGENTA@$WHITE"
P2="\h$BRIGHTBLUE)$BRIGHTMAGENTA-$BRIGHTBLUE($BRIGHTWHITE\w$BRIGHTBLUE"
P3=")$BRIGHTMAGENTA-$MAGENTA$SYM$NORMAL\n$MAGENTA$SYM$BRIGHTMAGENTA-"
P4="$BRIGHTBLUE($BRIGHTWHITE\$?$BRIGHTBLUE)$MAGENTA>$NORMAL "
#PS1="$P1$P2$P3$P4"


if [ "$TERM" = "linux" ]
then
#we're on the system console or maybe telnetting in
export PS1="\[\e[32;1m\]\u@\H > \[\e[0m\]"
else
#we're not on the console, assume an xterm
#export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "
export PS1="\[\e]2;\u - $ip \w\a\e[32;1m\]$BRIGHTBLUE[$GREEN\u$BRIGHTWHITE@$GREEN\h$BRIGHTBLUE]$BRIGHTWHITE-$BRIGHTBLUE[$GREEN\w$BRIGHTBLUE]$NORMAL\n$BRIGHTGREEN($BRIGHTWHITE\$?$BRIGHTGREEN)$SYM\[\e[0m\] "
fi




#export PS1="\[\e]2;\u - $ip \w\a\e[32;1m\]$BRIGHTBLUE[$GREEN\u$BRIGHTWHITE@$GREEN\h$BRIGHTBLUE]$BRIGHTWHITE-$BRIGHTBLUE[$GREEN\w$BRIGHTBLUE]$NORMAL\n$BRIGHTGREEN($BRIGHTWHITE\$?$BRIGHTGREEN)$SYM\[\e[0m\] "


# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi


LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'


export LS_COLORS


alias ls='ls --color=auto -NF'


你可能感兴趣的:(bashrc)