From 7703ade5d84a8b85552ca3d68ad9fb8f3a0df937 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sun, 8 Jul 2012 05:37:19 +0300 Subject: [PATCH] Add checks for homebrew python on OS X. --- modules/python/init.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index e9a74d47..1f0821d1 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -11,6 +11,16 @@ if [[ "$OSTYPE" == darwin* ]]; then path=($HOME/Library/Python/*/bin(N) $path) manpath=($HOME/Library/Python/*/{,share/}man(N) $manpath) + _brew_py="/usr/local/share/python" + _brew_py3="/usr/local/share/python3" + + if [[ -s "$_brew_py" ]]; then + path=("$_brew_py" $path) + fi + + if [[ -s "$_brew_py3" ]]; then + path=("$_brew_py3" $path) + fi else # This is subject to change. path=($HOME/.local/bin $path)