Add Oh My ZSH! dependency and make a few adjustments to accomodate

This commit is contained in:
Eryn Wells 2013-01-23 11:11:52 -08:00
parent 52396e8b55
commit f40332b379
3 changed files with 38 additions and 6 deletions

2
rc
View file

@ -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'

View file

@ -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

25
zshrc
View file

@ -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