diff --git a/dotfiles/zshrc b/dotfiles/zshrc index c920ce3..70c9493 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -168,11 +168,17 @@ fi # Load any local settings if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi -# Set prompt based on local settings -if test -f "${HOME}/.zprompt" ; then - THEME=${THEME:=$(cat "${HOME}/.zprompt")} +# separate interactive block based on .zshrc.local +if [[ $- == *i* ]] ; then + # Set prompt based on local settings + if test -f "${HOME}/.zprompt" ; then + THEME=${THEME:=$(cat "${HOME}/.zprompt")} + fi + if command -v starship >/dev/null 2>&1 ; then + : ${THEME:=starship} + if [ "${THEME}" = "starship" ] ; then + eval "$(starship init zsh)" + fi + fi + prompt "${THEME:-matir}" >/dev/null 2>&1 fi -if command -v starship >/dev/null 2>&1 ; then - : ${THEME:=starship} -fi -prompt "${THEME:-matir}" >/dev/null 2>&1