. /etc/profile HOMEDIR=`echo ~` HISTSIZE=2000 HISTFILE=~/.zsh_history SAVEHIST=2000 LISTMAX=1000 ####################### # prompt & term title # ####################### function precmd { case $TERM in rxvt*) print -Pn "\e]0;%~\a" ;; xterm*) print -Pn "\e]0;%~\a" ;; screen*) print -Pn "\ek%~\e\\" ;; esac } function preexec { case $TERM in rxvt*) print -Pn "\e]0;$1\a" ;; xterm*) print -Pn "\e]0;$1\a" ;; screen*) print -Pn "\ek$1\e\\" ;; esac } PS1=$'%{\e[1;34m%}%~%{\e[0m%}> ' RPROMPT=$'%{\e[1;34m%}%n%{\e[0m%}@%{\e[1;34m%}%m%{\e[0m%}' ############## # zshoptions # ############## setopt AUTO_LIST unsetopt BEEP setopt CLOBBER setopt LIST_TYPES setopt EXTENDED_HISTORY ############### # zshbuiltins # ############### alias dir='\ls --literal --color=tty' alias ls='ls --literal --color=tty -a' alias ll='ls -l' alias gcc='gcc -Wall' unlimit limit coredumpsize 0 [[ $EMACS = t ]] && unsetopt zle ########## # zshzle # ########## bindkey '^[[B' down-line-or-search bindkey '^[[A' up-line-or-search bindkey '\M-^H' backward-delete-word bindkey '\M-d' delete-word # ----------------------------------------------------------------------------- #export ENSCRIPT=--fancy-header=a2ps #export GNUSTEP_USER_PATH=~/.GNUstep #export GNUSTEP_USER_ROOT=~/.GNUstep #export GZIP=-9 #export LESS=-aiMQ #export LESSCHARSET=latin1 #export PAGER=less #export PERL_BADLANG=0 #export RSYNC_RSH=ssh #export TOP=-s1 # ----------------------------------------------------------------------------- ########### # compsys # ########### FPATH="$HOMEDIR/local/share/zsh:$FPATH" # Load the completion system zmodload zsh/complist autoload -U compinit && compinit # Force rehash of commands names _force_rehash() { (( CURRENT == 1 )) && rehash return 1 # Because we didn't really complete anything } zstyle ':completion:::::' completer _force_rehash _complete _approximate # Enable caching zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zsh/cache # Remove trailing slashes zstyle ':completion:*' squeeze-slashes true # Complete prefix bindkey '^i' expand-or-complete-prefix zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )' zstyle ':completion:*:descriptions' format "- %d -" zstyle ':completion:*:corrections' format "- %d - (errors %e})" zstyle ':completion:*:default' list-prompt '%S%M matches%s' zstyle ':completion:*' group-name '' zstyle ':completion:*:manuals' separate-sections true zstyle ':completion:*' menu select zstyle ':completion:*' verbose yes ####################### # local configuration # ####################### [ -r $HOMEDIR/.zshrc.local ] && . $HOMEDIR/.zshrc.local export PATH=$PATH:$HOMEDIR/local/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOMEDIR/local/lib