All pastes #1972929 Raw Edit

.bashrc

public shellscript v1 · immutable
#1972929 ·published 2010-10-25 16:36 UTC
rendered paste body
# /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/profilefiexport EDITOR="vim"export DIETY=$EDITORif [[ -f ~/.svn.sh ]]then	source ~/.svn.shfi# 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!	returnfifunction 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 scriptif [[ -f ~/.colors ]]then	source ~/.colorsfi# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489if [[ -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#Aliasesalias 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\\"'#		;;#esacPROMPT_COMMAND="prompt_command"export PS1="${BGREEN}${USER}@${HOSTNAME} ${BBLUE}[${TEAL}\${newPWD}${BBLUE}]${BRED}\$(__git_svn_ps1)${BBLUE}\$fill${BBLUE}[${TEAL}\$LOADS${BBLUE}]${RESET}\n$ "