# /etc/skel/.bashrc: # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. So make sure this doesn't display # anything or bad things will happen ! if [[ -f /etc/profile ]] then source /etc/profile fi export EDITOR="vim" export DIETY=$EDITOR if [[ -f ~/.svn.sh ]] then source ~/.svn.sh fi # Test for an interactive shell. There is no need to set anything # past this point for scp and rcp, and it's important to refrain from # outputting anything in those cases. if [[ $- != *i* ]] ; then # Shell is non-interactive. Be done now! return fi function prompt_command { case $TERM in xterm*|rxvt*|Eterm) echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007" ;; screen) echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\" ;; esac LOADS=$(uptime | awk '{print $(NF - 2) $(NF - 1) $NF}') # Add all the accessories below ... local temp="${USER}@${HOSTNAME}$(__git_svn_ps1) [${PWD}][$LOADS]" let fillsize=${COLUMNS}-${#temp} if [ "$fillsize" -gt "0" ] then fill=" " # Its theoretically possible someone could need more # dashes than above, but very unlikely! HOWTO users, # the above should be ONE LINE, it may not cut and # paste properly fill="${fill:0:${fillsize}}" newPWD="${PWD}" fi if [ "$fillsize" -lt "0" ] then fill="" let cut=3-${fillsize} newPWD="...${PWD:${cut}}" fi } # Import the color codes into this script if [[ -f ~/.colors ]] then source ~/.colors fi # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 if [[ -f ~/.dir_colors ]] then eval `dircolors -b ~/.dir_colors` elif [[ -f /etc/DIR_COLORS ]] then # This is for Gentoo systems eval `dircolors -b /etc/DIR_COLORS` else # Added this in for Debian systems eval `dircolors` fi #Aliases alias ls="ls -h --color=auto" alias ll="ls -l" alias la="ll -a" alias rm="rm -i" alias psgrep="ps aux | grep -v grep | grep" #alias mysql4="mysql -h 127.0.0.1 -P 3366" #alias mysql4dump="mysqldump -h 127.0.0.1 -P 3366" # Change the window title of X terminals #case $TERM in # xterm*|rxvt*|Eterm) # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' # ;; # screen) # PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' # ;; #esac PROMPT_COMMAND="prompt_command" export PS1="${BGREEN}${USER}@${HOSTNAME} ${BBLUE}[${TEAL}\${newPWD}${BBLUE}]${BRED}\$(__git_svn_ps1)${BBLUE}\$fill${BBLUE}[${TEAL}\$LOADS${BBLUE}]${RESET}\n$ "