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 if [[ ! -d "$HOME/.zsh" ]]; then
mkdir -p ~/.zsh mkdir -p "$HOME/.zsh"
fi fi
fpath=(~/.zsh $fpath) fpath=(~/.zsh $fpath)
if [[ -f "$HOME/.zshcfg" ]]; then if [[ -f "$HOME/.zshcfg" ]]; then
source ~/.zshcfg source "$HOME/.zshcfg"
else else
CONF_BINARYCLOCK=0 CONF_BINARYCLOCK=0
CONF_ENABLEGIT=0 CONF_ENABLEGIT=0
@ -33,6 +33,24 @@ if [[ $CONF_ENABLESH -eq 1 ]]; then
fi fi
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 # Lines configured by zsh-newuser-install
HISTFILE=~/.zsh_history HISTFILE=~/.zsh_history
HISTSIZE=10000 HISTSIZE=10000
@ -241,7 +259,7 @@ remindperms () {
#### ####
if [[ -f "$HOME/.zshenv" ]]; then if [[ -f "$HOME/.zshenv" ]]; then
source ~/.zshenv source "$HOME/.zshenv"
fi fi
if [[ $CONF_FORTUNE -eq 1 ]]; then if [[ $CONF_FORTUNE -eq 1 ]]; then
@ -249,4 +267,4 @@ if [[ $CONF_FORTUNE -eq 1 ]]; then
echo echo
fi 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"