Source

myhome / .zshrc

The default branch has multiple heads

Full commit
setopt prompt_subst
setopt extendedglob
###
# Set shell options
###
setopt auto_menu auto_cd correct auto_name_dirs auto_remove_slash
setopt hist_ignore_dups hist_ignore_space prompt_subst
setopt pushd_ignore_dups rm_star_silent sun_keyboard_hack
setopt extended_glob 
setopt list_types list_packed nolistbeep  
setopt no_beep always_last_prompt
setopt cdable_vars sh_word_split auto_param_keys
setopt append_history inc_append_history
setopt share_history
setopt complete_in_word
setopt auto_pushd

autoload -U compinit
compinit

# 先方予測
# autoload predict-on
# predict-on

# unsetopt promptcr

## Set Local Options 
local BLACK=$'%{\e[00;47;30m%}'
local RED=$'%{\e[00;31m%}'
local GREEN=$'%{\e[00;32m%}'
local YELLOW=$'%{\e[00;33m%}'
local BLUE=$'%{\e[00;34m%}'
local MAGENTA=$'%{\e[00;35m%}'
local CYAN=$'%{\e[00;36m%}'
local WHITE=$'%{\e[00;37m%}'

PROMPT="%U$USER@%m%%%u "
RPROMPT="[%~]"

PAGER='less -imJMW'
MANPAGER='less -imJMW'
BROWSER='firefox'

# for vim keybinding
#bindkey -v
bindkey -e
EDITOR=vim
VISUAL=vim

# for zsh line editor
autoload edit-command-line
zle -N edit-command-line
# bindkey -M vicmd "^v" edit-command-line
bindkey '^v' edit-command-line

# tcsh like history expansion
autoload -U history-search-end
zle -N history-beginning-search-forward-end history-search-end
zle -N history-beginning-search-backward-end history-search-end
bindkey "^N" history-beginning-search-forward-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^R" history-incremental-search-backward

# URL quote
autoload -U url-quote-magic
zle -N self-insert url-quote-magic

# history option
# history log file
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
setopt extended_history
# show all history
function history-all { history -E 1 }

#export ZLS_COLORS='di=01;34'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

export SVN_EDITOR="vim"
export EDITOR="vim"
export LANG=ja_JP.UTF-8
export LC_ALL=ja_JP.UTF-8
#export MANPAGER="lv"

# for spidermonkey
export PATH="$HOME/work/js/bin":$PATH
alias jsc="jslint.sh"

# for rsense http://cx4a.org/software/rsense/
export RSENSE_HOME=$HOME/work/github/vim/rsense

alias cdr="cd /home/kanbe/work/kanvi_backup/ruby/rails3"

#alias
alias -g sc="screen"
alias vi="vim"
alias cd=" cd"
alias pwd=" pwd"
alias p=" pwd"
#alias ls=' ls --color=auto'
alias ls=' ls -G'
alias grep='grep --color=auto'
alias la='ls -a'
alias ll='ls -l'
alias lla='ls -la'
alias l='ls -l'
alias p='pwd'
alias -g G="| grep"
alias -g L='| vim -R -c "set nowrap" -'
alias ipy='ipython -logfile $HOME/.python_history'
alias info='info --vi-keys'
alias pa='ps -aux'
#alias w3m='w3m -no-mouse -cookie -o accept_bad_cookie=1'
#alias less="lv"

# for screen
alias sv="screen -D -RR -c $HOME/.screenrc.vim -S vim"
alias ss="screen -D -RR -c $HOME/.screenrc.shell -S shell"

#erlang man
alias eman="erl -man"

# remove vim's swap files
alias rmswp="find . \( -name '.*.sw*' \) -exec rm '{}' +"

## グローバルエイリアスの設定
# cat hoge | less をcat hoge L という風に記述できる。
alias -g L='| less'
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g W='| wc'
alias -g S='| sed'
alias -g A='| awk'
alias -g N='| growlnotify -s -t "command" -m "finished."'

# for http-proxy
alias -g P=' --http-proxy=http://10.9.21.20:8000'

# for sgw
alias cdo="cd /home/kanbe/work/kanvi_backup/scala/OracleParser"
alias cdk="cd /home/kanbe/work/kanvi_backup"
if [[ -s /home/kanbe/.rvm/scripts/rvm ]] ; then source /home/kanbe/.rvm/scripts/rvm ; fi

#source ~/.zprofile
#source ~/.psshrc

# Erlang 
# export ERLANG_HOME=$HOME/local/r14b04
# export PATH=$PATH:$ERLANG_HOME/bin
# export MANPATH=$ERLANG_HOME/man:$MANPATH
# . $HOME/local/r14b04/activate

# export EDITOR=emacsclient
# export VISUAL=emacsclient
export EDITOR=vim
export VISUAL=vim

# Oracle
# export ORACLE_HOME=/usr/lib/oracle/10.2.0.4/client64
# export PATH=$PATH:$ORACLE_HOME/bin
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
# export TNS_ADMIN=$ORACLE_HOME/network/admin

# pythonbrew
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
export PYTHONPATH=/usr/local/lib/python2.7

# rvm
# [[ -s "/home/kanbe/.rvm/scripts/rvm" ]] && source "/home/kanbe/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

# macports
# export PATH=/opt/local/bin:/opt/local/sbin:$PATH

# homebrew
export PATH=/usr/local/bin:$PATH