autoload -U compinit promptinit compinit promptinit # load default profile source /etc/profile prompt yi; # custom paths if [ -e $HOME/.serial_number ]; then export PATH=$PATH:$HOME/Scripts/:/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin/ fi # LC_CTYPE export LC_CTYPE=en_US.UTF-8 # DISPLAY # export DISPLAY=:0.0 # aliases if [ -e $HOME/.serial_number ]; then alias ls="ls -G -h" alias ll="ls -G -l" alias df="df -h" alias dot="ls -ldF .[a-zA-Z0-9]*" alias du="du --h" alias port="sudo port" export EDITOR="mate -w" export MANPATH=/opt/local/share/man:$MANPATH elif [ ${HOST} = "helium.vibrantlogic.com" ]; then alias ls="ls -G -F -h" alias ll="ls -G -F -l -h" alias df="df -h" alias du="du -h" alias dot="ls -l -h -d -F -G .[a-zA-Z0-9]*" else alias ls="ls --color --si --classify" alias ll="ls -l --color --si --classify" alias df="df --si" alias du="du --si" alias dot="gls -ldF .[a-zA-Z0-9]*" fi alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../../" alias free="free -m" alias exit="clear && exit" alias grep="grep -n" alias v="vim" alias hw="cd ~/Documents/homework" alias dl="cd ~/Downloads" alias sw="cd ~/Software" alias win="cd /mnt/windows/Documents \and \Settings/yi" alias dsage="cd ~/Software/sage/devel/sage/sage/dsage" alias sage="~/Software/sage/sage" alias sage-python="~/Software/sage/sage-python" alias sage-devel="cd ~/Software/sage/devel/sage/sage" alias docu="cd ~/Documents" alias class="cd ~/Documents/Classes" alias h="fc -r -l 1 |less" alias less="less -N" alias rm="rm -i" # options export HISTSIZE=5000 export SAVEHIST=5000 export HISTFILE=~/.zsh_history # ssh keychain (linux only) #/usr/bin/keychain -q $HOME/.ssh/id_rsa #source $HOME/.keychain/$HOST-sh # Set Zsh Options setopt nobeep # no more beeps setopt autocd # change to dirs automatically setopt correct # spelling corrections setopt appendhistory # don't overwrite history setopt auto_list setopt auto_menu # complete ssh hosts local _myhosts _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} ) zstyle ':completion:*' hosts $_myhosts # caching of completion zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zsh/cache # prevent cvs files/dirs from being completed: zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS' zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS' # completing process IDs with menu selection: zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always # cd will never select the parent directory zstyle ':completion:*:cd:*' ignore-parents parent pwd # keybindings bindkey "^Y" yank # -Y bindkey '^A' beginning-of-line bindkey '^E' end-of-line # End (xterm) bindkey "^B" backward-word # -B bindkey "^N" forward-word # -N bindkey "^R" history-incremental-search-backward # -R bindkey "^P" quote-line # -P bindkey "^K" run-help # -K bindkey "^Z" which-command # -Z bindkey "\e[A" history-search-backward bindkey "\e[B" history-search-forward bindkey -v # Functions for displaying good stuff in a terminal title case $TERM in xterm*|rxvt|rxvt-unicode|screen|(K|a)term) precmd () { rehash print -Pn "\033]0;%n@%m %~\a" } esac ECHO PATH=$PATH > .profile # Updates PATH for TextMate