[zsh] Update shell init; use ZSH autoloaded functions instead of a bunch of files
This commit is contained in:
parent
2b584f97cf
commit
b09d523218
13 changed files with 208 additions and 138 deletions
29
zsh/func/init_env_darwin_python
Normal file
29
zsh/func/init_env_darwin_python
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env zsh
|
||||
# vim:ft=zsh:
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function init_env_darwin_python
|
||||
{
|
||||
local pythonRoot
|
||||
local python27SitePackages
|
||||
|
||||
pythonRoot="$HOME/Library/Python"
|
||||
if [[ -d "$pythonRoot" ]]; then
|
||||
for f in `ls "$pythonRoot"`; do
|
||||
prepend_to_path "$pythonRoot/$f/bin"
|
||||
done
|
||||
fi
|
||||
|
||||
python27SitePackages="$pythonroot/2.7/lib/python/site-packages"
|
||||
if [[ -d "$python27SitePackages" ]]; then
|
||||
if [[ ! -z $PYTHONPATH ]]; then
|
||||
PYTHONPATH=$python27SitePackages:$PYTHONPATH
|
||||
else
|
||||
PYTHONPATH=$python27SitePackages
|
||||
fi
|
||||
fi
|
||||
|
||||
export PYTHONPATH
|
||||
}
|
||||
|
||||
init_env_darwin_python "$@"
|
Loading…
Add table
Add a link
Reference in a new issue