Refactor to correct with linter

This commit is contained in:
James Patrick 2024-08-09 11:14:14 -04:00
parent 55924c472e
commit 068b845b6c
No known key found for this signature in database

View File

@ -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