/ Published in: Bash
Expand |
Embed | Plain Text
# loads o' history from many shells at same time export HISTSIZE=10000 export HISTFILESIZE=1000000 export EDITOR=emacs export PROMPT_COMMAND='history -a' shopt -s histappend # meh aliases alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' alias rot13='tr A-Za-z N-ZA-Mn-za-m' # teh sxy prmpt ftn function echo_prompt ( ) { local DEFAULT_COLOR='\[\e[0m\]' local GREEN='\[\e[0;32m\]' local RED='\[\e[0;31m\]' local YELLOW='\[\e[1;33m\]' local LGREEN='\[\e[1;32m\]' local PURPLE='\[\e[0;35m\]' local TIME="${GREEN}\t" local RET_CODE="${RED}(\$?)" local USER="${LGREEN}\u@\h" local PWD="${YELLOW}\w" local TITLE='\[\e]0;\u@\h \w\]' if [ ! -z "${CLEARCASE_ROOT}" ]; then local CC_VIEW="${PURPLE}[$(basename $CLEARCASE_ROOT)]" echo "${TITLE}\n${TIME} ${RET_CODE} ${USER} ${CC_VIEW} ${PWD}\n\$ ${DEFAULT_COLOR}" else echo "${TITLE}\n${TIME} ${RET_CODE} ${USER} ${PWD}\n\$ ${DEFAULT_COLOR}" fi } ls_color_opt="" case "$TERM" in 'xterm' | 'dtterm' | 'ansi' | 'vt102' | 'rxvt' | 'cygwin' ) if [ `uname` = 'Linux' ] ; then ls_color_opt=true fi PS1=$( echo_prompt ) ;; 'dumb' | * ) export PS1="\u@\h \w\n\$ " ;; esac if [ ! -z "${ls_color_opt}" ]; then alias l='ls -FC --color' alias la='ls -aFC --color' alias ll='ls -lF --color' alias lla='ls -alF --color' else alias l='ls -FC ' alias la='ls -aFC' alias ll='ls -lF' alias lla='ls -alF' fi
You need to login to post a comment.
