X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=zsh%2Fzshrc;h=994bd71732e38626f4b0543aab95b8091b36cca6;hb=85cef43f457f743edbf30fa50a877a1a9e697eed;hp=0f02ab5e20432f24b994c971bba4060501891575;hpb=225922506cac73da6970538863babe17b954d3e6;p=dotfiles.git diff --git a/zsh/zshrc b/zsh/zshrc index 0f02ab5..994bd71 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -112,9 +112,19 @@ alias cp='cp -i' alias ln='ln -i' #alias svn='colorsvn' -alias sed='/usr/local/bin/gsed' +if [[ $OSNAME == 'Darwin' ]]; then + [[ -f '/usr/local/bin/gsed' ]] || echo "zshrc warning: no gsed" +fi +[[ -f '/usr/local/bin/gsed' ]] && alias sed='/usr/local/bin/gsed' +##### Git +alias 'gs'='git status' +alias 'ga'='git add' +alias 'gc'='git commit' +alias 'gl'='git log --oneline --graph --all --color --decorate --abbrev-commit' alias 'git-log'='git log --oneline --graph --all --color --decorate --abbrev-commit' +alias 'gdiff'='git diff' +alias 'gpush'='git push origin master' @@ -285,6 +295,7 @@ export MANPATH=$MANPATH:/usr/local/man export MANPATH=$MANPATH:${HOME}/perl5/man export PATH=$PATH:"${HOME}/scripts" +export PATH=$PATH:"/sbin:/usr/sbin" ## hunspell path export DICPATH="/usr/local/share/hunspell/" @@ -302,7 +313,7 @@ if [[ $OSNAME == 'Darwin' ]]; then export ANDROID_TOOLCHAIN="$ANDROID_NDK_HOME/standalone-toolchain-api14/" export ANDROID_HOME="$HOME/android/android-sdk-macosx/" export PATH=$PATH:"${ANDROID_TOOLCHAIN}/bin/":"${ANDROID_HOME}/platform-tools/" - export PATH="$HOME/bin":"/usr/local/bin":$PATH + export PATH="$HOME/bin":"/usr/local/bin":"/usr/local/sbin":$PATH ## appended by cpan initializaion @@ -313,5 +324,28 @@ if [[ $OSNAME == 'Darwin' ]]; then PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"; export PERL_MM_OPT; fi +# add Racket into PATH +export PATH="/Applications/Racket v6.6/bin":$PATH; +export MANPATH="/Applications/Racket v6.6/man":$MANPATH; + # export ~/.bin into PATH export PATH="$HOME/.bin":$PATH; + + +# source Android bin +[[ -f "$ZSHHOME/androidrc" ]] && . "$ZSHHOME/androidrc" + +if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" + +# tmux variable +export TMUX_IP=`echo $SSH_CONNECTION | awk '{print $3}'` +if [[ $OSNAME == 'Darwin' ]]; then + ip=`ifconfig | grep "inet .*broadcast" | head -1 | awk '{print $2}'` + [[ $TMUX_IP = "" ]] && TMUX_IP=$ip +else + ip=`ip addr | grep 'inet .*global' | head -1 | sed 's/^.*inet //g; s/\/.*$//g'` + [[ $TMUX_IP = "" ]] && TMUX_IP=$ip +fi +