Last active
April 27, 2016 19:31
-
-
Save finscn/2ae6e0cbb73878c73102 to your computer and use it in GitHub Desktop.
My .bash_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TERM=xterm-color | |
# for color | |
export CLICOLOR=1 | |
export LSCOLORS=gxfxaxdxcxegedabagacad | |
# grep | |
alias grep='grep --color=always' | |
export COLOR_NC='\\e[0m' # No Color | |
export COLOR_WHITE='\\e[1;37m' | |
export COLOR_BLACK='\\e[0;30m' | |
export COLOR_BLUE='\\e[0;34m' | |
export COLOR_LIGHT_BLUE='\\e[1;34m' | |
export COLOR_GREEN='\\e[0;32m' | |
export COLOR_LIGHT_GREEN='\\e[1;32m' | |
export COLOR_CYAN='\\e[0;36m' | |
export COLOR_LIGHT_CYAN='\\e[1;36m' | |
export COLOR_RED='\\e[0;31m' | |
export COLOR_LIGHT_RED='\\e[1;31m' | |
export COLOR_PURPLE='\\e[0;35m' | |
export COLOR_LIGHT_PURPLE='\\e[1;35m' | |
export COLOR_BROWN='\\e[0;33m' | |
export COLOR_YELLOW='\\e[1;33m' | |
export COLOR_GRAY='\\e[0;30m' | |
export COLOR_LIGHT_GRAY='\\e[0;37m' | |
alias colorslist="set | egrep 'COLOR_\\w*'" # lists all the colors | |
# \h:\W \u\$ | |
# export PS1='\[\033[01;33m\]\u@\h\[\033[01;31m\] \W\$\[\033[00m\] ' | |
# export PS1='\u@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ ' | |
# export PS1='\[\033[01;33m\]\u@\h\[\033[01;31m\] \W$(git_branch) \$\[\033[00m\] ' | |
function parse_git_dirty { | |
if [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] | |
then | |
echo "* " | |
elif [[ $(git status 2> /dev/null | grep -o "branch is ahead of") != "" ]] | |
then | |
echo "^ " | |
else | |
echo "" | |
fi | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[$(parse_git_dirty)\1]/" | |
} | |
# export PS1='\h:\W\[\e[1;36m\]$(parse_git_branch)\[\e[0m\] \u$ ' | |
export PS1='\[\033[01;33m\]\u@\h\[\033[01;31m\] \W \[\033[00;32m\]$(parse_git_branch)\[\033[01;31m\]\$\[\033[00m\] ' | |
############################################################## | |
############################################################## | |
############################################################## | |
alias ls='ls -G' | |
alias ll='ls -l -a -h' | |
alias openresty='/usr/local/openresty/nginx/sbin/nginx' | |
alias tbs='python ~/DEV/tbs-tools/inspector.py --adb ~/DEV/adb-tools/adb' | |
export PATH=${PATH}:~/DEV/adb-tools | |
export PATH=/usr/local/sbin:/usr/local/lib/node_modules:$PATH | |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig | |
export NODE_PATH=/usr/local/lib/node_modules | |
## | |
# Your previous /Users/fins/.bash_profile file was backed up as /Users/fins/.bash_profile.macports-saved_2012-11-22_at_00:53:20 | |
## | |
# MacPorts Installer addition on 2012-11-22_at_00:53:20: adding an appropriate PATH variable for use with MacPorts. | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x | |
export COCOS_CONSOLE_ROOT=/Applications/Cocos/frameworks/cocos2d-x-3.8/tools/cocos2d-console/bin | |
export PATH=$COCOS_CONSOLE_ROOT:$PATH | |
# Add environment variable COCOS_FRAMEWORKS for cocos2d-x | |
export COCOS_FRAMEWORKS=/Applications/Cocos/frameworks | |
export PATH=$COCOS_FRAMEWORKS:$PATH | |
# Add environment variable ANT_ROOT for cocos2d-x | |
export ANT_ROOT=/Applications/Cocos/tools/ant/bin | |
export PATH=$ANT_ROOT:$PATH | |
# https://npm.taobao.org/ | |
alias cnpm="npm --registry=https://registry.npm.taobao.org \ | |
--cache=$HOME/.npm/.cache/cnpm \ | |
--disturl=https://npm.taobao.org/dist \ | |
--userconfig=$HOME/.cnpmrc" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment