This commit is contained in:
Paul Walker
2021-04-27 11:27:56 +01:00
parent d7ed05c35e
commit 730253d1fd
6 changed files with 114 additions and 0 deletions

33
zshrc Normal file
View File

@@ -0,0 +1,33 @@
# Add an entry to PATH, iff it's not already there.
addpath() {
wanted_path=$1
at_end=$2
FOUND=$(echo $PATH | grep $wanted_path)
if [ $? -ne 0 ] ; then
if [ "$at_end" == "" ] ; then
export PATH=$wanted_path:$PATH
else
export PATH=$PATH:$wanted_path
fi
fi
}
autoload -Uz compinit && compinit
addpath $HOME/bin
# Not version controlled, it's system specific.
if [ -r $HOME/.cargo/env ] ; then
source $HOME/.cargo/env
fi
# Load any supplementary scripts
if [ -d "$HOME"/.zshrc.d ] ; then
for config in "$HOME"/.zshrc.d/*.zsh ; do
source "$config"
done
unset -v config
fi
if [ -f ${HOME}/.zsh.d/local/${HOSTNAME}.zsh ] ; then
source ${HOME}/.zsh.d/local/${HOSTNAME}.zsh
fi