diff --git a/bin/prompt-themes.sh b/bin/prompt-themes.sh index ff0ba91..d933337 100755 --- a/bin/prompt-themes.sh +++ b/bin/prompt-themes.sh @@ -80,7 +80,12 @@ else fi # ensure ls uses color -echo "[prompt-themes] ⚙️ Applied: alias ls='ls --color=auto'" -alias ls='ls --color=auto' +# put this inside a conditional to only use it when being run in an interactive shell +# otherwise it will interfere with things trying to use the shell. ie scp, rsync, +# scripts...now safe to use inside .bashrc +if [[ $- == *i* ]]; then + echo "[prompt-themes] ⚙️ Applied: alias ls='ls --color=auto'" + alias ls='ls --color=auto' +fi