Squashed 'oh-my-zsh/' content from commit 550ccca

git-subtree-dir: oh-my-zsh
git-subtree-split: 550ccca91cb45fcf26a8f2c3c60da675b995e3f3
This commit is contained in:
2015-02-05 18:32:26 +01:00
commit 21ca061287
417 changed files with 25689 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
_homebrew-installed() {
type brew &> /dev/null
}
_pyenv-from-homebrew-installed() {
brew --prefix pyenv &> /dev/null
}
FOUND_PYENV=0
pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv")
if _homebrew-installed && _pyenv-from-homebrew-installed ; then
pyenvdirs=($(brew --prefix pyenv) "${pyenvdirs[@]}")
fi
for pyenvdir in "${pyenvdirs[@]}" ; do
if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then
FOUND_PYENV=1
export PYENV_ROOT=$pyenvdir
export PATH=${pyenvdir}/bin:$PATH
eval "$(pyenv init --no-rehash - zsh)"
function pyenv_prompt_info() {
echo "$(pyenv version-name)"
}
fi
done
unset pyenvdir
if [ $FOUND_PYENV -eq 0 ] ; then
function pyenv_prompt_info() { echo "system: $(python -V 2>&1 | cut -f 2 -d ' ')" }
fi