# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/home/dmitri/.zshrc' bindkey '\e[3~' delete-char # del bindkey ';5D' backward-word # ctrl+left bindkey ';5C' forward-word #ctrl+right autoload -Uz compinit compinit # End of lines added by compinstall if [[ $EUID == 0 ]] then PROMPT=$'%{\e[1;31m%}%n %{\e[1;34m%}%~ #%{\e[0m%} ' # user dir % else PROMPT=$'%{\e[1;32m%}%n %{\e[1;34m%}%~ %#%{\e[0m%} ' # root dir # fi RPROMPT=$'%{\e[1;34m%}%T%{\e[0m%}' # right prompt with time autoload zkbd [[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd [[ ! -f ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE} ]] && zkbd source ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE} #setup key accordingly [[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line [[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line [[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode [[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char [[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history [[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history [[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char [[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char # AutoCD setopt autocd # Set xterm title case $TERM in (xterm*|rxvt) precmd () { print -Pn "\e]0;%n@%m: %~\a" } preexec () { print -Pn "\e]0;%n@%m: $1\a" } ;; esac # Extended opts setopt extendedglob setopt extended_glob # Expands {abc}file to afile bfile cfile, etc. setopt brace_ccl # Searches =name in PATH setopt equals # Dont require a leading dot for matching "hidden" files setopt glob_dots # Enable multiple redirections setopt multios # Report status of bg jobs immediately setopt notify # Report status of bg jobs if exiting setopt check_jobs # Suffix aliases alias -s py='env python' alias ipy='ipython' alias php='env php' alias ls='ls -F --color=auto' alias grep='grep --colour=auto' alias df='df -m' alias less='less -M' alias ll='ls -lah --color=auto' alias screen='screen -RD' alias e-i='easy_install -d ~/.python/lib -s ~/.python/bin' alias -s {avi,mpeg,mpg,mov,m2v}=mplayer alias -s {odt,doc,sxw,rtf}=openoffice.org alias -s {ogg,mp3,wav,wma}=beep-media-player alias -s pdf=xpdf autoload -U pick-web-browser alias -s {html,htm}=pick-web-browser zmodload -a zsh/stat stat zmodload -a zsh/zpty zpty zmodload -a zsh/zprof zprof zmodload -ap zsh/mapfile mapfile zstyle ':completion::default' list-colors '${LS_COLORS}' zstyle ':completion:*:default' list-colors 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;31:' #zstyle ':completion:*' completer complete _list _oldlist _expand _ignored _match _correct _approximate _prefix zstyle ':completion:*' insert-unambiguous true zstyle ':completion:*' add-space true zstyle ':completion:*:processes' command 'ps -xuf' zstyle ':completion:*:processes-names' command 'ps xho command' zstyle ':completion:*:processes' sort false zstyle ':completion:*:cd:*' ignore-parents parent pwd zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' zstyle ':completion:*:functions' ignored-patterns '*' zstyle ':completion:*' menu select=long-list select=0 zstyle ':completion:*' old-menu false zstyle ':completion:*' original true if [ -d ~/.python ]; then export PATH="~/.python/bin:${PATH}" fi; if [ -x ~/.python/bin/py.test ]; then alias py.test="~/.python/bin/py.test" fi