# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
#alias cdlog='cd /home/work/var/log/`date +%Y%m%d` '
alias ll='ls -lG'
alias ls='ls -G'
export GREP_OPTIONS='--color=auto'
export PATH="$PATH:/Users/zuoerdong/bin"
export PATH="$PATH:/usr/local/go/bin"
function git_branch {
branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
if [ "${branch}" != "" ];then
if [ "${branch}" = "(no branch)" ];then
branch="(`git rev-parse --short HEAD`...)"
fi
echo " ($branch)"
fi
}
export PS1='\u@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ '
bashrc
a min to read
post