dotar/zsh/zshrc

67 lines
2.1 KiB
Bash
Raw Normal View History

# --------------------------------
#
# DO NOT EDIT THIS FILE.
# If you want to make changes, do so in the custom/zsh directory.
# Fork and send pull requests to add features and fix bugs. Thanks!
#
# ================================
# Don't change. The following determines where YADR is installed.
yadr=`find -L ~ -type file -maxdepth 2 -name .yadr | head | sed 's:\.yadr\/::'`
# Source oh-my-zsh if it is installed.
if [[ -d $HOME/.oh-my-zsh ]]; then
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="skwp"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(vi-mode git rvm ruby rails autojump bundler gem gnu-utils heroku rake redis-cli zsh-syntax-highlighting history-substring-search ssh-agent)
# source every zsh file in user's custom/zsh/before. This is useful for setting theme and plugins.
if [[ -d $yadr/custom/zsh/before ]]; then
for config_file ($yadr/custom/zsh/before/*) source $config_file
fi
# Source oh-my-zsh
source $ZSH/oh-my-zsh.sh
fi
2011-11-23 09:02:36 +08:00
# Configuration
for config_file ($yadr/zsh/*.zsh) source $config_file
2012-01-31 12:39:20 +08:00
# RVM / rbenv
if [[ -d ~/.rvm/ ]] && [[ -d ~/.rbenv/ ]]; then
# TODO: colorize
echo '***************************************************************'
echo 'ERROR!'
echo 'YADR found both ~/.rvm and ~/.rbenv directories. You cannot use'
echo 'RVM and rbenv simultaneously. Please delete one and reload zsh.'
echo '***************************************************************'
echo ''
else
if [[ -d ~/.rvm/ ]]; then
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
fi
if [[ -d ~/.rbenv/ ]]; then
eval "$(rbenv init -)"
fi
fi
# ------------------
# zsh/after
# ==================
# source every zsh file in user's custom/zsh/after.
if [[ -d $yadr/custom/zsh/after ]]; then
for config_file ($yadr/custom/zsh/after/*) source $config_file
fi
2011-11-23 09:02:36 +08:00
# Put secret configuration settings in ~/.secrets
if [[ -a ~/.secrets ]] then
source ~/.secrets
fi
2011-11-23 09:02:36 +08:00