crypta /.zshrc

my zshrc file
alias cp='cp -R'
alias h=history
alias grep=egrep
alias df='LC_MESSAGES=C df -h'
alias less='less -M'
alias ls='ls -F'
alias ll='ls -l'
alias la='ls -A'
alias li='ls -ial'
alias lsd='ls -ld *(-/DN)'
alias lsa='ls -ld .*'
alias mc='mc -b'
alias -g G='|egrep'
alias -g M='|more'
alias -g L='|less'
alias -g H='|head'
alias -g T='|tail'
alias -g N='2>/dev/null'
alias ls='ls -F --color=always'
umask 022
HOSTNAME=$HOST
export EDITOR=vim
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/usr/bin/X11:$HOME/bin
export PS1="%n@%m:% %B%d%b%#>"

# more cruft
setopt APPEND_HISTORY AUTO_LIST AUTO_REMOVE_SLASH
setopt LIST_TYPES LONG_LIST_JOBS HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_IGNORE_SPACE
setopt   globdots pushdtohome autolist autocd interactivecomments
setopt   recexact longlistjobs histignoredups histignorespace
setopt   autoresume histignoredups pushdsilent 
setopt   autopushd pushdminus extendedglob globdots
unsetopt bgnice autoparamslash 

zmodload zsh/complist
setopt menucomplete
zstyle ':completion:*' menu yes select
bindkey -M menuselect " " accept-and-menu-complete
local _myhosts
_myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
zstyle ':completion:*' hosts $_myhosts
zstyle ':completion:*:(ssh|scp):*' tag-order '! users'
[[ -z "$terminfo[kpp]" ]] || bindkey -M menuselect "$terminfo[kpp]" vi-backward-word
[[ -z "$terminfo[kdp]" ]] || bindkey -M menuselect "$terminfo[kdp]" vi-forward-word
bindkey -M menuselect "^H" undo
zstyle ':completion:*:processes' command 'ps -xuf'
zstyle ':completion:*:processes' sort false
zstyle ':completion:*:processes-names' command 'ps xho command'


HISTFILE=~/.zhistory
SAVEHIST=2500
HISTSIZE=2500

typeset -U path cdpath fpath manpath

# completion
autoload -U compinit
compinit


zstyle ':completion::complete:*' use-cache 1
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST

alias which >&/dev/null && unalias which

case $TERM in
        linux|screen|screen.linux)
	bindkey "^[[2~" yank
	bindkey "^[[3~" delete-char
	bindkey "^[[5~" up-line-or-history
	bindkey "^[[6~" down-line-or-history
	bindkey "^[[1~" beginning-of-line
	bindkey "^[[4~" end-of-line
	bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command
	bindkey "^[[A" up-line-or-search ## up arrow for back-history-search
	bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search
	bindkey " " magic-space ## do history expansion on space
        preexec () {
            print -Pn "\e]0;%n@%m: %~ \($1\)\a"
        }
        precmd () {print -Pn "\e]0;%n@%m: %~\a"}

	;;
	*xterm*|rxvt|(dt|k|E)term)
	bindkey "^[[2~" yank
	bindkey "^[[3~" delete-char
	bindkey "^[[5~" up-line-or-history
	bindkey "^[[6~" down-line-or-history
	bindkey "^[[7~" beginning-of-line
	bindkey "^[[8~" end-of-line
        bindkey "^[[H" beginning-of-line # Home
        bindkey "^[[F" end-of-line # End
	bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command
	bindkey "^[[A" up-line-or-search ## up arrow for back-history-search
	bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search
	bindkey " " magic-space ## do history expansion on space
	preexec () {
            print -Pn "\e]0;%n@%m: %~ \($1\)\a"
	}
	precmd () {print -Pn "\e]0;%n@%m: %~\a"}
	;;
esac

unlimit
limit stack 8192
limit core 0
limit -s

export LESS="-R"


DIRSTACKSIZE=20

zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile

bindkey -e	

bindkey ' ' magic-space    # also do history expansion on space
bindkey '^I' complete-word # complete on tab, leave expansion to _expand

zstyle ':completion:*::::' completer _expand _complete _ignored _approximate

zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'

zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
zstyle ':completion:*:expand:*' tag-order all-expansions
zstyle ':completion:*' verbose no
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
zstyle ':completion:*:*:(^rm):*:*files' ignored-pacodeerns '*?.o' '*?.c~' '*?.old' '*?.pro'
zstyle ':completion:*:functions' ignored-pacodeerns '_*'

limit coredumpsize 0


#colored completions
export LS_COLORS="di=33;4:ln=35;4:ex=31:*.rpm=32:*.gz=34:*.tar=34:*.tgz=36:*.bz 2=36:*.deb=34" 
ZLS_COLORS=$LS_COLORS
zmodload -i zsh/complist

## add colors to completions
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}