fix up $path initialization in zshenv
This commit is contained in:
parent
45447e32c6
commit
abd2dbaf65
1 changed files with 8 additions and 11 deletions
17
zshenv
17
zshenv
|
|
@ -1,14 +1,11 @@
|
||||||
path=($HOME/bin $HOME/apps/bin /usr/local/bin /usr/local/sbin /opt/local/bin /opt/local/sbin $path)
|
custom_paths=(/sbin /usr/sbin $HOME/bin $HOME/.rbenv/bin /usr/local/android/tools /usr/local/android/platform-tools /Applications/Xcode.app/Contents/Developer/usr/bin)
|
||||||
[[ -e "$HOME/apps/android/tools" ]] && path=($HOME/apps/android/tools $path)
|
for dir in $custom_paths; do
|
||||||
[[ -e "$HOME/apps/android/platform-tools" ]] && path=($HOME/apps/android/platform-tools $path)
|
if [[ -d "$dir" ]]; then
|
||||||
[[ -e "$HOME/.rbenv/bin" ]] && path=($HOME/.rbenv/bin $path)
|
path=($dir $path)
|
||||||
[[ -e "/Applications/Xcode.app/Contents/Developer/usr/bin" ]] && path=(/Applications/Xcode.app/Contents/Developer/usr/bin $path)
|
|
||||||
|
|
||||||
if [[ -d $HOME/apps/ ]]; then
|
|
||||||
for bindir in $HOME/apps/*/bin(N); do
|
|
||||||
path=($bindir $path)
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
export path
|
||||||
|
typeset -U path
|
||||||
|
|
||||||
ZDOTDIR=~/config/zsh
|
ZDOTDIR=~/config/zsh
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue