Zshの設定ファイルのメモ

毎回設定が分からなくなるので、メモしておく。

# The following lines were added by compinstall
# Time-stamp:<2009-02-24 20:33:40>
zstyle :compinstall filename '/home/toru/.zshrc'
#zstyle ':completion:*' list-colors di=34 fi=0
zstyle ':completion:*' list-colors ''
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
# History seting
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt hist_ignore_dups     # ignore duplication command history list
setopt share_history        # share command history data
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
setopt autocd
# End of lines configured by zsh-newuser-install
# LANG
# export LANG=ja_JP.UTF-8
# export LANG=ja_JP.eucJP
## Default shell configuration
#
# set prompt
#
case ${UID} in
0)
PROMPT="%B%{e[32m%}%/#%{e[m%}%b "
PROMPT2="%B%{e[32m%}%_#%{e[m%}%b "
SPROMPT="%B%{e[32m%}%r is correct? [n,y,a,e]:%{e[m%}%b "
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] &&
PROMPT="%{e[37m%}${HOST%%.*} ${PROMPT}"
;;
*)
PROMPT="%{e[32m%}%/%%%{e[m%} "
PROMPT2="%{e[32m%}%_%%%{e[m%} "
SPROMPT="%{e[32m%}%r is correct? [n,y,a,e]:%{e[m%} "
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] &&
PROMPT="%{e[37m%}${HOST%%.*} ${PROMPT}"
;;
esac
# set terminal title including current directory
#
case "${TERM}" in
kterm*|xterm)
precmd() {
echo -ne "33]0;${USER}@${HOST%%.*}:${PWD}07"
}
;;
esac
## Keybind configuration
#
# emacs like keybind (e.x. Ctrl-a goes to head of a line and Ctrl-e goes
#   to end of it)
#
bindkey -e
# auto change directory
#
setopt auto_cd
# auto directory pushd that you can get dirs list by cd -[tab]
#
setopt auto_pushd
# command correct edition before each completion attempt
#
setopt correct
# compacked complete list display
#
setopt list_packed
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'