Skip to content

Instantly share code, notes, and snippets.

@zhouyl
Last active March 6, 2018 01:08
Show Gist options
  • Select an option

  • Save zhouyl/bd70d4cd858dd5925a0b486f769e8157 to your computer and use it in GitHub Desktop.

Select an option

Save zhouyl/bd70d4cd858dd5925a0b486f769e8157 to your computer and use it in GitHub Desktop.
HOME 目录的 bash profile 设置
if [ -z $RCLOAD ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
function git-branch-name {
git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3
}
function git-branch-prompt {
local branch=`git-branch-name`
if [ $branch ]; then printf " [%s]" $branch; fi
}
export PS1="\u:\[\033[0;36m\]\w\[\033[0m\]\[\033[0;35m\]\$(git-branch-prompt)\[\033[0m\] \$ "
#export PS1="\u:\w $ "
export CLICOLOR=1
export GREP_OPTIONS="--color=auto"
alias grep="/bin/grep $GREP_OPTIONS"
unset GREP_OPTIONS
export NODE_PATH=/usr/local/node
export PHP_PATH=/usr/local/php
export PROTO_PATH=/usr/local/protobuf
export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PROTO_PATH/bin:$PHP_PATH/bin:$NODE_PATH/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib
export RCLOAD=yes
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment