Refactor to correct with linter
This commit is contained in:
parent
55924c472e
commit
068b845b6c
28
zsh/zshenv
28
zsh/zshenv
|
@ -67,18 +67,28 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
|
|||
|
||||
typeset -gU path
|
||||
path=(
|
||||
$HOME/.cargo/bin/
|
||||
$HOME/.scripts/
|
||||
$HOME/.emacs.d/bin/
|
||||
$HOME/.yarn/bin/
|
||||
$HOME/.config/yarn/global/node_modules/.bin/
|
||||
$HOME/.local/bin/
|
||||
$path)
|
||||
"$HOME/.cargo/bin/"
|
||||
"$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.
|
||||
# It will load based on hostname & uname.
|
||||
env_loader(){
|
||||
[ -e ${ZDIR}/environment/os/$OSTYPE/$1 ] && source ${ZDIR}/environment/os/$OSTYPE/$1
|
||||
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: env_loader file"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -e "${ZDIR}/environment/os/$OSTYPE/$1" ]; then
|
||||
source "${ZDIR}/environment/os/$OSTYPE/$1"
|
||||
fi
|
||||
if [ -e "${ZDIR}/environment/host/$HOST/$1" ] ; then
|
||||
source "${ZDIR}/environment/host/$HOST/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
env_loader zshenv
|
||||
|
|
Loading…
Reference in New Issue
Block a user