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)
|
||||
[[ -e "$HOME/apps/android/tools" ]] && path=($HOME/apps/android/tools $path)
|
||||
[[ -e "$HOME/apps/android/platform-tools" ]] && path=($HOME/apps/android/platform-tools $path)
|
||||
[[ -e "$HOME/.rbenv/bin" ]] && path=($HOME/.rbenv/bin $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
|
||||
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)
|
||||
for dir in $custom_paths; do
|
||||
if [[ -d "$dir" ]]; then
|
||||
path=($dir $path)
|
||||
fi
|
||||
done
|
||||
export path
|
||||
typeset -U path
|
||||
|
||||
ZDOTDIR=~/config/zsh
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue