# Path to your oh-my-zsh configuration. ZSH=$HOME/.oh-my-zsh # Update config once every 24 hours cd $HOME/.zcustom case "`uname`" in Linux) STATARGS="-c %Z" ;; Darwin) STATARGS="-f %m" ;; *) echo "Error! Unknown system `uname`" exit 1 ;; esac if [ -f .lastcheck ]; then # if it hasn't been touched in the last 24 hours NOW=`date +%s` LAST=`stat $STATARGS .lastcheck` if [ $(($NOW - $LAST)) -gt 86400 ]; then echo "Updating config" git pull touch .lastcheck fi else # Doesn't exist touch .lastcheck echo "Updating config" git pull fi cd # Aliases # Disable correction. alias ack='nocorrect ack' alias cd='nocorrect cd' alias cp='nocorrect cp' alias ebuild='nocorrect ebuild' alias gist='nocorrect gist' alias grep='nocorrect grep' alias heroku='nocorrect heroku' alias ln='nocorrect ln' alias man='nocorrect man' alias mkdir='nocorrect mkdir' alias mv='nocorrect mv' alias rm='nocorrect rm' # Disable globbing. alias fc='noglob fc' alias find='noglob find' alias ftp='noglob ftp' alias history='noglob history' alias locate='noglob locate' alias rake='noglob rake' alias rsync='noglob rsync' alias scp='noglob scp' alias sftp='noglob sftp' # Define general aliases. alias _='sudo' alias cp="${aliases[cp]:-cp} -i" alias ln="${aliases[ln]:-ln} -i" alias mkdir="${aliases[mkdir]:-mkdir} -p" alias mv="${aliases[mv]:-mv} -i" alias rm="${aliases[rm]:-rm} -i" alias l='ls -l' alias cls=clear DISABLE_UPDATE_PROMPT="true" # Uncomment following line if you want to disable marking untracked files under # VCS as dirty. This makes repository status check for large repositories much, # much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(battery brew golang lein osx zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh # Customize to your needs... unsetopt AUTO_PUSHD export PATH=~/.babel/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/X11/bin:/usr/texbin:/usr/local/share/npm/bin:$HOME/src/lang/go/bin:$HOME/bin:. #bindkey -e function follow() { if [ $# -eq 0 ]; then echo "Usage: follow \nChange to the directory holding \n" else pushd `filepath $1` fi } # Source per-instance customizations if they exist if [ -e $HOME/.zcustom/zshrc ]; then source $HOME/.zcustom/zshrc fi # Remove duplicate entries in the PATH typeset -U path