The Answer to Life, the Universe, and Everything

Monday, February 25, 2008

zshrc

mine

# Created by newuser for 4.3.4

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:/opt/apache-maven-2.0.8/bin

alias eclipse='/opt/eclipse/eclipse'
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
alias du="du -h"
alias df="df -h"
alias ps="ps -aux"

# For auto compinit
autoload -U compinit
compinit

# For prompt
PROMPT="%/%% "
PROMPT2="%_%% "
SPROMPT="%r is correct? [n,y,a,e]: "

# For title bar
case "${TERM}" in
kterm*|xterm)
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007"
}
;;
esac

# For history function
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data

# For History search shortcut
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

# Editor vi mode
bindkey -v

# For remembering the previous folder
setopt auto_pushd

# No beep
setopt nolistbeep

# For auto-prediction function
autoload predict-on
predict-on

No comments: