diff --git a/.zsh/pyenv.zsh b/.zsh/pyenv.zsh index 37edfe4..6c44bd4 100644 --- a/.zsh/pyenv.zsh +++ b/.zsh/pyenv.zsh @@ -1,3 +1,6 @@ -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" +if iscmd pyenv; then + export PYENV_ROOT="$HOME/.pyenv" + command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + diff --git a/.zsh/rtx.zsh b/.zsh/rtx.zsh index 8a72831..b5dd116 100644 --- a/.zsh/rtx.zsh +++ b/.zsh/rtx.zsh @@ -1,5 +1,7 @@ export RTX_SHELL=zsh +if iscmd rtx; then + rtx() { local command command="${1:-}" @@ -32,3 +34,4 @@ typeset -ag chpwd_functions; if [[ -z "${chpwd_functions[(r)_rtx_hook]+1}" ]]; then chpwd_functions=( _rtx_hook ${chpwd_functions[@]} ) fi +fi