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 typeset -gU path
path=( path=(
$HOME/.cargo/bin/ "$HOME/.cargo/bin/"
$HOME/.scripts/ "$HOME/.scripts/"
$HOME/.emacs.d/bin/ "$HOME/.emacs.d/bin/"
$HOME/.yarn/bin/ "$HOME/.yarn/bin/"
$HOME/.config/yarn/global/node_modules/.bin/ "$HOME/.config/yarn/global/node_modules/.bin/"
$HOME/.local/bin/ "$HOME/.local/bin/"
$path) "$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 if [ $# -ne 1 ]; then
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1 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 env_loader zshenv