Add zsh
This commit is contained in:
33
zshrc
Normal file
33
zshrc
Normal 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
|
||||
Reference in New Issue
Block a user