Using zsh array path instead of $PATH.
This commit is contained in:
parent
f1a5e6aa8d
commit
6d3554d18d
|
@ -1,3 +1,6 @@
|
||||||
export GOPATH="${HOME}/.go"
|
export GOPATH="${HOME}/.go"
|
||||||
PSQLAPP="/Applications/Postgres.app/Contents/Versions/latest"
|
PSQLAPP="/Applications/Postgres.app/Contents/Versions/latest"
|
||||||
export PATH="$PATH:${GOPATH}/bin:${PSQLAPP}/bin"
|
path=(
|
||||||
|
$GOPATH
|
||||||
|
$PSQLAPP
|
||||||
|
$path)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
GOLANG_PATH="/usr/lib/go/bin"
|
GOLANG_PATH="/usr/lib/go/bin"
|
||||||
|
|
||||||
export GOPATH="$HOME/src/go"
|
export GOPATH="$HOME/src/go"
|
||||||
export PATH="$GOPATH/bin/:$GOLANG_PATH:$PATH"
|
|
||||||
|
|
||||||
|
path=(
|
||||||
|
$GOPATH
|
||||||
|
$GOLANG_PATH
|
||||||
|
$path)
|
||||||
# vim: syn=zsh
|
# vim: syn=zsh
|
||||||
|
|
29
zsh/zshenv
29
zsh/zshenv
|
@ -48,7 +48,6 @@ if [ -z "$SPACESHIP_PROMPT_ORDER" ]; then
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set tmux profile default values.
|
# Set tmux profile default values.
|
||||||
zstyle ':tmux:auto-start' local 'yes'
|
zstyle ':tmux:auto-start' local 'yes'
|
||||||
zstyle ':tmux:auto-start' name 'tmux'
|
zstyle ':tmux:auto-start' name 'tmux'
|
||||||
|
@ -65,28 +64,20 @@ export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -100'"
|
||||||
# Auto suggestion config
|
# Auto suggestion config
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
|
||||||
|
|
||||||
|
|
||||||
|
typeset -gU path
|
||||||
|
path=(
|
||||||
|
$HOME/.scripts/
|
||||||
|
$HOME/~.emacs.d/bin/
|
||||||
|
$HOME/.yarn/bin/
|
||||||
|
$HOME/.config/yarn/global/node_modules/.bin/
|
||||||
|
$HOME/.local/bin/
|
||||||
|
$path)
|
||||||
|
|
||||||
# This will load the specified zsh files if they exist in the $ZDIR/environment directory.
|
# This will load the specified zsh files if they exist in the $ZDIR/environment directory.
|
||||||
# It will load based on hostname & uname.
|
# It will load based on hostname & uname.
|
||||||
env_loader(){
|
env_loader(){
|
||||||
[ -e ${ZDIR}/environment/os/$OSTYPE/$1 ] && source ${ZDIR}/environment/os/$OSTYPE/$1
|
[ -e ${ZDIR}/environment/os/$OSTYPE/$1 ] && source ${ZDIR}/environment/os/$OSTYPE/$1
|
||||||
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1
|
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (( $+commands[yarn] )) ; then
|
|
||||||
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
user_script_dir=~/.scripts
|
|
||||||
if [ -d $user_script_dir ] ; then
|
|
||||||
export PATH="$user_script_dir:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ~/.emacs.d/bin/ ] ; then
|
|
||||||
DOOM_BIN="$HOME/.emacs.d/bin"
|
|
||||||
export PATH="$DOOM_BIN:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
env_loader zshenv
|
env_loader zshenv
|
||||||
|
|
||||||
# Dedup path.
|
|
||||||
typeset -gU path
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user