From 2bdcf5e4e3e68ef012a265fb66a7049e2c521917 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 30 Nov 2015 09:55:18 +0100 Subject: [PATCH] Solarize the shell only when in interactive mode The escape sequences necessary for controlling the terminal's colors confuses FTP clients. Therefore, we only use the colors when we can actually see them -> shell is running interactively. --- bash_profile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash_profile b/bash_profile index 3a96e90..e49f349 100644 --- a/bash_profile +++ b/bash_profile @@ -165,4 +165,5 @@ solarized() { printf "\033[%sm%-7s\033[0m\n" "0;35" Magenta } -do_solarize_shell +# Solarize the shell only if running interactively (makes FTP clients happy) +[[ "$-" == *i* ]] && do_solarize_shell