# /etc/bashrc: # $Header: $ # This file is sourced by the default ~/.bashall, for all *interactive* # bash shells. The default ~/.bash_profile sources ~/.bashrc too, for # login bash shells. # This file *should generate no output* or it will break the scp and # rcp commands. # colors for ls, etc. eval `dircolors -b /etc/DIR_COLORS` alias d="ls --color" alias ls="ls --color=auto" alias ll="ls --color -l" # Change the window title of X terminals case $TERM in xterm*|rxvt|Eterm|eterm) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' ;; screen) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' ;; esac # Set colorful PS1 only on colorful terminals if dircolors --print-database|grep -q \^TERM.$TERM\$ && [ -n "$BASH" ] then if [ `/usr/bin/whoami` = 'root' ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]\' else export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi fi