From d40eb6b0a71765c91a6975fa730628a1abfe7168 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 15 Mar 2025 13:55:51 -0700 Subject: [PATCH] Bump zshrc --- dotfiles/zshrc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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