This commit is contained in:
Cynthia Foxwell 2023-07-31 17:37:58 -06:00
parent 0353bdd96c
commit 8595d08f86

View file

@ -1,11 +1,11 @@
if [[ ! -d "$HOME/.zsh" ]]; then
mkdir -p ~/.zsh
mkdir -p "$HOME/.zsh"
fi
fpath=(~/.zsh $fpath)
if [[ -f "$HOME/.zshcfg" ]]; then
source ~/.zshcfg
source "$HOME/.zshcfg"
else
CONF_BINARYCLOCK=0
CONF_ENABLEGIT=0
@ -33,6 +33,24 @@ if [[ $CONF_ENABLESH -eq 1 ]]; then
fi
fi
download() {
if [[ -x "$(command -v wget)" ]]; then
wget -qO "$2" "$1"
return $?
elif [[ -x "$(command -v curl)" ]]; then
curl -fsSL "$1" -o "$2"
return $?
fi
echo "Failed to download $1. curl or wget not installed"
return 1
}
if [[ ! -f "$HOME/.zsh/z.sh" ]]; then
download "https://raw.githubusercontent.com/rupa/z/master/z.sh" "$HOME/.zsh/z.sh"
fi
. "$HOME/.zsh/z.sh"
# Lines configured by zsh-newuser-install
HISTFILE=~/.zsh_history
HISTSIZE=10000
@ -241,7 +259,7 @@ remindperms () {
####
if [[ -f "$HOME/.zshenv" ]]; then
source ~/.zshenv
source "$HOME/.zshenv"
fi
if [[ $CONF_FORTUNE -eq 1 ]]; then
@ -249,4 +267,4 @@ if [[ $CONF_FORTUNE -eq 1 ]]; then
echo
fi
[[ $CONF_ENABLESH -eq 1 ]] && source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[[ $CONF_ENABLESH -eq 1 ]] && source "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"