Add Oh My ZSH! dependency and make a few adjustments to accomodate
This commit is contained in:
parent
52396e8b55
commit
f40332b379
3 changed files with 38 additions and 6 deletions
2
rc
2
rc
|
@ -6,7 +6,7 @@
|
||||||
print_heading -l 1 'Initializing interactive shell'
|
print_heading -l 1 'Initializing interactive shell'
|
||||||
|
|
||||||
print_info -l 2 'Creating aliases'
|
print_info -l 2 'Creating aliases'
|
||||||
alias j='jobs'
|
#alias j='jobs'
|
||||||
alias h='history'
|
alias h='history'
|
||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias du='du -h'
|
alias du='du -h'
|
||||||
|
|
17
setup.sh
17
setup.sh
|
@ -3,6 +3,8 @@
|
||||||
dfdir=$(cd "$(dirname "$0")" && pwd)
|
dfdir=$(cd "$(dirname "$0")" && pwd)
|
||||||
sys=`uname -s | tr A-Z a-z`
|
sys=`uname -s | tr A-Z a-z`
|
||||||
|
|
||||||
|
omzrepo=git://github.com/robbyrussell/oh-my-zsh.git
|
||||||
|
|
||||||
# Vim bundles
|
# Vim bundles
|
||||||
typeset -A vimbundles
|
typeset -A vimbundles
|
||||||
|
|
||||||
|
@ -24,6 +26,11 @@ vimbundles=( \
|
||||||
unimpaired "https://github.com/tpope/vim-unimpaired.git" \
|
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"
|
print -P "%BSymlinking config files%b"
|
||||||
for dotfile in `ls $dfdir`
|
for dotfile in `ls $dfdir`
|
||||||
do
|
do
|
||||||
|
@ -88,9 +95,11 @@ for module in ${(k)vimbundles}; do
|
||||||
print -P "$spaces%F{$color}$result%f"
|
print -P "$spaces%F{$color}$result%f"
|
||||||
done
|
done
|
||||||
|
|
||||||
print -P "%BSetting up command-t%b"
|
if [[ -d "$dfdir/vim/bundle/command-t/ruby/command-t" ]]; then
|
||||||
cd "$dfdir/vim/bundle/command-t/ruby/command-t"
|
print -P "%BSetting up command-t%b"
|
||||||
ruby extconf.rb
|
cd "$dfdir/vim/bundle/command-t/ruby/command-t"
|
||||||
make
|
ruby extconf.rb
|
||||||
|
make
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
25
zshrc
25
zshrc
|
@ -10,7 +10,7 @@ ZLE_MODE='vim'
|
||||||
|
|
||||||
|
|
||||||
# load bash/zsh/ksh agnostic configurations
|
# 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"
|
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 #{{{
|
function configure_zle #{{{
|
||||||
{
|
{
|
||||||
print_info -l 2 'Configuring ZLE'
|
print_info -l 2 'Configuring ZLE'
|
||||||
|
@ -150,6 +172,7 @@ function configure_completion #{{{
|
||||||
|
|
||||||
|
|
||||||
configure_general
|
configure_general
|
||||||
|
configure_omz
|
||||||
configure_zle
|
configure_zle
|
||||||
configure_modules_and_functions
|
configure_modules_and_functions
|
||||||
configure_zsh_aliases
|
configure_zsh_aliases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue