diff --git a/rc b/rc index 89849e4..c54a388 100644 --- a/rc +++ b/rc @@ -6,7 +6,7 @@ print_heading -l 1 'Initializing interactive shell' print_info -l 2 'Creating aliases' -alias j='jobs' +#alias j='jobs' alias h='history' alias df='df -h' alias du='du -h' diff --git a/setup.sh b/setup.sh index fd6e24f..f4cf0ba 100755 --- a/setup.sh +++ b/setup.sh @@ -3,6 +3,8 @@ dfdir=$(cd "$(dirname "$0")" && pwd) sys=`uname -s | tr A-Z a-z` +omzrepo=git://github.com/robbyrussell/oh-my-zsh.git + # Vim bundles typeset -A vimbundles @@ -24,6 +26,11 @@ vimbundles=( \ unimpaired "https://github.com/tpope/vim-unimpaired.git" \ ) +if [[ ! -d ~/.oh-my-zsh ]]; then + print -P "%BCloning Oh my ZSH!" + git clone $omzrepo +fi + print -P "%BSymlinking config files%b" for dotfile in `ls $dfdir` do @@ -88,9 +95,11 @@ for module in ${(k)vimbundles}; do print -P "$spaces%F{$color}$result%f" done -print -P "%BSetting up command-t%b" -cd "$dfdir/vim/bundle/command-t/ruby/command-t" -ruby extconf.rb -make +if [[ -d "$dfdir/vim/bundle/command-t/ruby/command-t" ]]; then + print -P "%BSetting up command-t%b" + cd "$dfdir/vim/bundle/command-t/ruby/command-t" + ruby extconf.rb + make +fi exit 0 diff --git a/zshrc b/zshrc index caf5d83..1bd2da9 100644 --- a/zshrc +++ b/zshrc @@ -10,7 +10,7 @@ ZLE_MODE='vim' # load bash/zsh/ksh agnostic configurations -[ -e $HOME/.rc ] && source $HOME/.rc +[[ -e $HOME/.rc ]] && source $HOME/.rc print_heading -l 1 "Initializing interactive Z Shell" @@ -31,6 +31,28 @@ function configure_general #{{{ } #}}} +# Configure oh-my-zsh +function configure_omz #{{{ +{ + if [[ ! -d ~/.oh-my-zsh ]]; then + print_error -l 2 "No ~/.oh-my-zsh directory; skipping" + return + fi + + print_info -l 2 'Configuring Oh My ZSH!' + + ZSH=$HOME/.oh-my-zsh + DISABLE_AUTO_UPDATE="true" + COMPLETION_WAITING_DOTS="true" + + plugins=(autojump brew encode64 fasd git gnu-utils history osx python) + + source $ZSH/oh-my-zsh.sh + + alias v='f -t -e vim -b viminfo' +} #}}} + + function configure_zle #{{{ { print_info -l 2 'Configuring ZLE' @@ -150,6 +172,7 @@ function configure_completion #{{{ configure_general +configure_omz configure_zle configure_modules_and_functions configure_zsh_aliases