Skip to content

Instantly share code, notes, and snippets.

@handlename
Created February 20, 2010 17:23
Show Gist options
  • Save handlename/309784 to your computer and use it in GitHub Desktop.
Save handlename/309784 to your computer and use it in GitHub Desktop.
# Created by NAGATA Hiroaki for 4.3.10
#
# path
#____________________________________________________________
export PATH=/usr/local/bin:$PATH
export PATH=/opt/local/apache2/bin:$PATH
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/man:$MANPATH
# for c++
export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=/opt/local/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/opt/local/include:$CPLUS_INCLUDE_PATH
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib
export BOOST_ROOT=/opt/local/include/boost:$BOOST_ROOT
# for Java
export JAVA_HOME=/Library/Java/Home
# for Go
export GOROOT=$HOME/go
export GOOS=darwin
export GOARCH=amd64
export GOBIN=$HOME/bin
export PATH=$GOBIN:$PATH
# for gisty
export GISTY_DIR="$HOME/dev/gists"
# for maven2
export M2_HOME="/opt/local/var/macports/software/maven2/2.2.0_0/opt/local/share/java/maven2/"
# www
export WWW="/opt/local/www"
#
# extended auto complete
#____________________________________________________________
autoload -U compinit
compinit
#
# dir history
#____________________________________________________________
setopt auto_pushd
#
# interactive correct
#____________________________________________________________
setopt correct
#
# set color for ls
#____________________________________________________________
export LSCOLORS=dxfxcxdxbxegedabagacad
export LS_COLORS='di=33:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;33:su=41;30:sg=46;30:tw=42;30:ow=43;30'
#
# show colorful candidates
#____________________________________________________________
zstyle ':completion:*' list-colors 'di=33' 'ln=35' 'so=32' 'ex=31' 'bd=46;33' 'cd=43;34'
#
# prompt
#____________________________________________________________
if [ "${TERM}" != "dumb" ]; then
autoload colors
colors
PROMPT="%B%{${fg[cyan]}%}%n @%m: %{${fg[red]}%}%1~ %(!,#,$)%{${reset_color}%}%b "
RPROMPT="%B%{${fg[cyan]}%}[%/]%{${reset_color}%}%b"
PROMPT2="%B%{${fg[orange]}%}%_ %%%{${reset_color}%}%b "
SPROMPT="%{${fg[yellow]}%}%r%{${reset_color}%} is correct? [n, y, a, e]: "
fi
#
# terminal title
#____________________________________________________________
case "${TERM}" in
kterm*|xterm|xterm-color)
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007"
}
;;
esac
case "${TERM}" in
dumb | emacs)
PROMPT="%m:%~> "
unsetopt zle
;;
esac
#
# command history
#____________________________________________________________
HISTFILE=~/.zsh_history
HISTSIZE=500000
SAVEHIST=500000
setopt hist_ignore_dups
setopt share_history
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
#
# alias
#____________________________________________________________
setopt complete_aliases
alias ls='ls -G'
alias la='ls -aG'
alias ll='ls -lhG'
alias lla='ls -lahG'
alias df='df -h'
alias du='du -h'
alias svnaddall="svn status | grep '^\?' | awk '{print $2}' | xargs svn add"
alias svndelall="svn status | grep '^!' | awk '{print $2}' | xargs svn del"
alias svnrevertall="svn status | grep '^M' | awk '{print $2}' | xargs svn revert"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment