From 4c0e0e27036981147a9cad95cde4bd4c88cfdfbb Mon Sep 17 00:00:00 2001 From: Simponic Date: Sun, 12 Mar 2023 20:17:20 -0600 Subject: [PATCH] Only pyenv and stuff if exist --- .zshrc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.zshrc b/.zshrc index 229f36c..9e5f6b9 100644 --- a/.zshrc +++ b/.zshrc @@ -13,8 +13,6 @@ then printf "$(cat $logo)\n\n" fi -. /opt/asdf-vm/asdf.sh - # Alt+b stops at forwardslashes backward-kill-dir () { local WORDCHARS=${WORDCHARS/\/} @@ -34,13 +32,21 @@ HISTSIZE=10000 SAVEHIST=10000 setopt appendhistory +# asdf +[ -f /opt/asdf-vm/asdf.sh ] && . /opt/asdf-vm-asdf.sh + + # thefuck eval $(thefuck --alias) # Pyenv -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" +if [ -d "$HOME/.pyenv" ] +then + export PYENV_ROOT="$HOME/.pyenv" + command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + # ghcup-env [ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env"