From 023db0c8b0b0d84d4948ee121391fdc2155ccaab Mon Sep 17 00:00:00 2001 From: Adam Cammack Date: Thu, 21 May 2020 09:26:58 -0500 Subject: [PATCH] Set prompt escape chars only when they work --- lib/rex/text/color.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/text/color.rb b/lib/rex/text/color.rb index ecf4afc..58b6b13 100644 --- a/lib/rex/text/color.rb +++ b/lib/rex/text/color.rb @@ -52,7 +52,7 @@ module Color def substitute_colors(msg, in_prompt = nil) str = msg.dup pre_color = post_color = '' - if (in_prompt) + if (in_prompt && supports_color?) pre_color = "\x01" # RL_PROMPT_START_IGNORE post_color = "\x02" # RL_PROMPT_END_IGNORE end