X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=zsh%2Fzshrc;h=3c07c11514830479b4d77dcf2d96350ba6bfcf11;hb=70e2f651c7c18ab0631648fa8ac4972248f63c6f;hp=758863f77edd4f07fa8f89b00530f6534b506331;hpb=29757ae620a75ea01fbd37dfb46cde95c59a8c56;p=dotfiles.git diff --git a/zsh/zshrc b/zsh/zshrc index 758863f..3c07c11 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,4 +1,4 @@ - +#!/bin/zsh autoload colors colors @@ -47,17 +47,17 @@ man() { export PYTHONPATH="/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/" export DEV_ENV_ROOT=$HOME/android/ -export ANDROID_NDK_ROOT="${DEV_ENV_ROOT}/android-ndk-r8c/" +export ANDROID_NDK_ROOT="${DEV_ENV_ROOT}/android-ndk-r10d/" export ANDROID_SDK_ROOT="${DEV_ENV_ROOT}/android-sdk-macosx/" #export ANDROID_TOOLCHAIN="${DEV_ENV_ROOT}/standalone-toolchain-api14/" -export ANDROID_NDK_HOME="$HOME/android/android-ndk-r8c" +export ANDROID_NDK_HOME="$HOME/android/android-ndk-r10d" export ANDROID_TOOLCHAIN="$ANDROID_NDK_HOME/standalone-toolchain-api14/" -export ANDROID_HOME="/Users/peli3/android/android-sdk-macosx/" +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 @@ -90,6 +90,8 @@ alias ln='ln -i' #alias svn='colorsvn' alias sed='/usr/local/bin/gsed' +alias 'git-log'='git log --oneline --graph --all --color --decorate --abbrev-commit' + ########################### zsh completion ########################## @@ -136,9 +138,9 @@ GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}" GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}" GIT_PROMPT_BEHIND="%{$fg[cyan]%}BNUM%{$reset_color%}" GIT_PROMPT_MERGING="%{$fg_bold[magenta]%}⚡︎%{$reset_color%}" -GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" -GIT_PROMPT_MODIFIED="%{$fg_bold[yellow]%}●%{$reset_color%}" -GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}" +GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}•%{$reset_color%}" +GIT_PROMPT_MODIFIED="%{$fg_bold[yellow]%}•%{$reset_color%}" +GIT_PROMPT_STAGED="%{$fg_bold[green]%}•%{$reset_color%}" # Show Git branch/tag, or name-rev if on detached head parse_git_branch() { @@ -194,14 +196,79 @@ git_prompt_string() { RPS1='$(git_prompt_string)' #source ~/Private/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh -source ~/Private/zsh_plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # http://stackoverflow.com/questions/3483604/which-shortcut-in-zsh-does-the-same-as-ctrl-u-in-bash bindkey \^U backward-kill-line export PYTHONSTARTUP="$HOME/.pythonrc" -source $HOME/.cpverc -source $HOME/.eccrc +export ZSHHOME="$HOME/.zsh" +[[ -f "$ZSHHOME/cpverc" ]] && . "$ZSHHOME/cpverc" +[[ -f "$ZSHHOME/eccrc" ]] && . "$ZSHHOME/eccrc" + #` git log --oneline --abbrev-commit --all --graph --decorate --color ` [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh + +alias emacs='TERM=xterm-256color emacs -nw' + +alias tw='open -a /Applications/TextWrangler.app/' + +# +#function exists { which $1 &> /dev/null } +# +#if exists percol; then +# function percol_select_history() { +# local tac +# exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } } +# BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER") +# CURSOR=$#BUFFER # move cursor +# zle -R -c # refresh +# } +# +# zle -N percol_select_history +# bindkey '^R' percol_select_history +#fi +export LANG='en_US.UTF-8' +export LC_ALL="en_US.UTF-8" + +lftp-cp() { + + server='cmbu-ftp.cisco.com' + user='cmbu' + pass='cisco123!@#' + home='/FTPServer/users/peli3' + dir=`date +%m%d` + + localfile=$1; + remotefile=${home}/${dir}/$2; + + echo "copy ${localfile} to ftp://${server}${remotefile}" + lftp -e "mkdir ${home}/${dir}; put ${localfile} -o ${remotefile}; bye" -u $user,$pass $server +} +merge_logs() { + ls -rl jabber.log* | awk '{print $9}' | Xargs cat >> full.log +} + +export MANPATH=$MANPATH:/usr/local/man + + +## vim YouCompleteMe +# https://github.com/Valloric/YouCompleteMe/issues/18 +#export DYLD_FORCE_FLAT_NAMESPACE=1 + +## appended by cpan initializaion +PATH="/Users/peli3/perl5/bin${PATH:+:${PATH}}"; export PATH; +PERL5LIB="/Users/peli3/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="/Users/peli3/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"/Users/peli3/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=/Users/peli3/perl5"; export PERL_MM_OPT; + + + + +export MANPATH=$MANPATH:${HOME}/perl5/man + +export PATH=$PATH:"${HOME}/scripts" +## hunspell path +export DICPATH="/usr/local/share/hunspell/"