# Arun Prasannan # Note to self - Clean this up. # The following lines were added by compinstall zstyle :compinstall filename '/home/polar/.zshrc' # Search path for the cd command cdpath=(.. ~ ~/src ~/zsh) # Use hard limits, except for a smaller stack and no core dumps unlimit limit stack 8192 limit core 0 limit -s umask 022 # Aliases alias ls="ls -F --color=auto" # colours alias mv='nocorrect mv' # no spelling correction on mv alias cp='nocorrect cp' # no spelling correction on cp alias mkdir='nocorrect mkdir' # no spelling correction on mkdir alias j=jobs alias pu=pushd alias po=popd alias d='dirs -v' alias h=history alias grep=egrep alias ll='ls -l' alias la='ls -a' alias lsa='ls -ld .*' alias l='ls' # List only directories and symbolic links that point to directories alias lsd='ls -ld *(-/DN)' alias grep="grep --colour" alias vess="/usr/share/vim/vim71/macros/less.sh" alias vi="vim" alias sl="sl -alFe" # Global aliases -- These do not have to be at the beginning of the command line. alias -g M='|more' alias -g H='|head' alias -g T='|tail' freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done } # Autoloaded function definitions fpath=($fpath ~/.zfunc) for func in $^fpath/*(N-.x:t); autoload $func # automatically remove duplicates from these arrays typeset -U path cdpath fpath manpath hosts=(`hostname` foo bar pants) setopt appendhistory beep nomatch setopt notify globdots correct pushdtohome cdablevars autolist setopt correctall autocd recexact longlistjobs setopt autoresume histignoredups pushdsilent # noclobber setopt autopushd pushdminus extendedglob rcquotes mailwarning unsetopt bgnice autoparamslash zmodload -a zsh/stat stat zmodload -a zsh/zpty zpty zmodload -a zsh/zprof zprof zmodload -ap zsh/mapfile mapfile autoload -U compinit compinit # list of completers to use zstyle ':completion:*::::' completer _expand _complete _ignored _approximate # allow one error for every three characters typed in approximate completer zstyle -e ':completion:*:approximate:*' max-errors \ 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )' # insert all expansions for expand completer zstyle ':completion:*:expand:*' tag-order all-expansions # formatting and messages zstyle ':completion:*' verbose yes 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 '' # match uppercase from lowercase zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # offer indexes before parameters in subscripts zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters # command for process lists, the local web server details and host completion zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args' zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html' zstyle '*' hosts $hosts # Filename suffixes to ignore during completion (except after rm command) zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' \ '*?.old' '*?.pro' # the same for old style completion #fignore=(.o .c~ .old .pro) # ignore completion functions (until the _ignored completer) zstyle ':completion:*:functions' ignored-patterns '_*' # Add colors in completions zmodload -i zsh/complist eval $(dircolors) zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} PROMPT=$'%(?..%{\e[41;38m%}%B-%?-%b%{\e[0m%} )%(1j.%{\e[01;33m%}[%j] .)%{\e[01;36m%}%n@%m%{\e[0m%} %{\e[01;32m%}%2~%{\e[0m%} %B%#%b ' RPROMPT=$'%{\e[01;31m%}[%!]%{\e[0m%}' # history # on right bindkey -v bindkey '^X^Z' universal-argument ' ' magic-space bindkey '^X^A' vi-find-prev-char-skip bindkey '^Xa' _expand_alias bindkey '^Z' accept-and-hold bindkey -s '\M-/' \\\\ bindkey -s '\M-=' \| bindkey ' ' magic-space # also do history expansion on space bindkey '^I' complete-word # complete on tab, leave expansion to _expand bindkey '^[[1~' beginning-of-line # HOME bindkey '^[[4~' end-of-line # END bindkey '^[[3~' delete-char # DELETE bindkey '^[[2~' overwrite-mode # INSERT bindkey '^[[5~' history-beginning-search-backward # PAGE UP bindkey '^[[6~' history-beginning-search-forward # PAGE DOWN # MAILCHECK=300 # MAIL= HISTSIZE=1000 HISTFILE=~/.histfile SAVEHIST=1000 DIRSTACKSIZE=20 LS_COLORS=${LS_COLORS}:"*.flv=01;35" export GREP_COLOR='01;35' export PAGER='most' export EDITOR='vim' export VISUAL='vim' export LESS=-cex3M b() {xbacklight -set $((${1:-0} * 10))} t() {cat /proc/acpi/thermal_zone/TZ01/temperature} alias ...='../..' alias ....='../../..' alias mmv='noglob zmv -W' alias info='pinfo'