All pastes #1235052 Raw Edit

sini's zshrc

public shellscript v1 · immutable
#1235052 ·published 2008-10-23 20:58 UTC
rendered paste body
###########################################################        # Options for zshexport PATH="/home/sini/.cw/def:$PATH"export CW_COLORIZE=grey export HISTFILE=~/.zsh_historyexport HISTSIZE=500export SAVEHIST=50000autoload -U compinit compinitsetopt autopushd pushdminus pushdsilent pushdtohomesetopt autocdsetopt cdablevars#setopt ignoreeofsetopt interactivecommentssetopt nobanghistsetopt noclobbersetopt HIST_REDUCE_BLANKSsetopt HIST_IGNORE_SPACEsetopt SH_WORD_SPLITsetopt nohupsetopt complete_in_wordsetopt always_to_end            # When complete from middle, move cursorsetopt correct                  # Spelling correctionsetopt extended_historyfunction precmd { title zsh "$PWD" }function preexec {    emulate -L zsh    local -a cmd; cmd=(${(z)1})    title $cmd[1]:t "$cmd[2,-1]"}function title() {	if [[ $TERM == "screen" ]]; then		print -nR $'\033k'$1$'\033'\\		print -nR $'\033_'$2$'\033'\\	elif [[ $TERM == "xterm" || $TERM == "rxvt-unicode" ]]; then		print -Pn "\e]0;$*$i\a"	fi}# PS1 and PS2export PS1="$(print '%{\e[1;34m%}%n%{\e[0m%}'):$(print '%{\e[0;34m%}%~%{\e[0m%}')$ "export PS2="$(print '%{\e[0;34m%}>%{\e[0m%}')"# Vars used later on by zshexport EDITOR="vim"export XTERM="urxvt"################################################################### Stuff to make my life easier# allow approximatezstyle ':completion:*' completer _complete _match _approximatezstyle ':completion:*:match:*' original onlyzstyle ':completion:*:approximate:*' max-errors 1 numeric# tab completion for PID :Dzstyle ':completion:*:*:kill:*' menu yes selectzstyle ':completion:*:kill:*' force-list always# cd not select parent dir. zstyle ':completion:*:cd:*' ignore-parents parent pwdzstyle ':completion::complete:*' use-cache 1################################################################### Key bindings# http://mundy.yazzy.org/unix/zsh.php# http://www.zsh.org/mla/users/2000/msg00727.htmltypeset -g -A keybindkey -vbindkey '\e[3~' delete-charbindkey '^R' history-incremental-search-backwardbindkey '^?' backward-delete-charbindkey '^[[1~' beginning-of-linebindkey '^[[5~' up-line-or-historybindkey '^[[3~' delete-charbindkey '^[[4~' end-of-linebindkey '^[[6~' down-line-or-historybindkey '^[[A' up-line-or-searchbindkey '^[[D' backward-charbindkey '^[[B' down-line-or-searchbindkey '^[[C' forward-char ################################################################### My aliases# Set up auto extension stuffalias -s html=$BROWSERalias -s org=$BROWSERalias -s php=$BROWSERalias -s com=$BROWSERalias -s net=$BROWSERalias -s png=fehalias -s jpg=fehalias -s gif=fegalias -s sxw=sofficealias -s doc=sofficealias -s gz=tar -xzvfalias -s bz2=tar -xjvfalias -s java=$EDITORalias -s txt=$EDITORalias -s PKGBUILD=$EDITOR# Normal aliasesalias ls='ls --color=auto -F'alias lsd='ls -ld *(-/DN)'alias lsa='ls -ld .*'alias f='find |grep'alias c="clear"alias dir='ls -1'alias ..='cd ..'alias top='htop'# command L equivalent to command |lessalias -g L='|most' # command S equivalent to command &> /dev/null &alias -g S='&> /dev/null &'# type a directory's name to cd to it.compctl -/ cd