# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias la='ls -a'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# git config start
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\] \$ '
# git config end
copy下链接中的内容过来
git 命令tab补全:
https://github.com/git/git/tree/master/contrib/completion
激活环境变量
source ~/.bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias la='ls -a'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# git config start
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\] \$ '
# git config end
copy下链接中的内容过来
git 命令tab补全:
https://github.com/git/git/tree/master/contrib/completion
激活环境变量
source ~/.bashrc