autoload -U compinit
compinit
alias d='dirs -v'
alias ls='ls -F --color=auto'
alias l='ls -F --color=auto'
alias mv='mv -i'
alias load='while :; do echo > /dev/null; done'
autoload -U promptinit
promptinit
setopt autocd autopushd pushdignoredups hist_verify correct

# completion
zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric

zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always

zstyle ':completion:*:cd:*' ignore-parents parent pwd

# keys
bindkey '^[Od' emacs-backward-word
bindkey '^[Oc' emacs-forward-word
bindkey '^[[4~' end-of-line
bindkey '^[[1~' beginning-of-line


# colors
gray_color=$'%{\e[00;37m%}'
green_color=$'%{\e[01;32m%}'
lightblue_color=$'%{\e[01;36m%}'
darkblue_color=$'%{\e[00;36m%}'
yellow_color=$'%{\e[01;33m%}'
lightred_color=$'%{\e[01;31m%}'
darkred_color=$'%{\e[00;31m%}'
reset_color=$'%{\e[0m%}'
PS1="${gray_color}[${green_color}%* ${darkblue_color}%n${lightblue_color}@\
${darkblue_color}%m ${darkred_color}<${lightred_color}%?${darkred_color}> \
${yellow_color}%c${gray_color}]%# ${reset_color}"

# dump cores
ulimit -c unlimited

# gnustep
#. /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh

#export CVS_RSH="/usr/bin/ssh"
#export CVSROOT=":ext:cvs@server:/var/www/cvs"

x(){ test $2&&(_i=$1;shift;while test $_i -gt 0;do $@;let _i--;done;)||echo 'need 2 arguments';}
