From e7d36e373782b99f35ef195ed51ec7f08b9e91a0 Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Tue, 6 May 2025 01:32:47 +0300 Subject: [PATCH] fixed a echo warning and alias ls so it won't be used except in ineractive shells --- bin/prompt-themes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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