From 0a934fd176a7540cf75e9ea5369748983bb6ec57 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 25 May 2026 16:56:25 +0300 Subject: fix(.bashrc): No escape sequences on dumb terminals --- .bashrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index fdd9360..86967cc 100644 --- a/.bashrc +++ b/.bashrc @@ -36,12 +36,16 @@ export PROMPT_COMMAND="shell_var_fix;" if hc_mode then printf "\001\e[38;5;${1}m\e[48;5;${2}m\002" - else + elif [ "$TERM" != 'dumb' ] + then printf "\001\e[${1}m\e[${2}m\002" fi } colors_res() { - printf "\001\e[0m\002" + if [ "$TERM" != 'dumb' ] + then + printf "\001\e[0m\002" + fi } # $1 cap colour [OPTIONAL] -- cgit v1.3.1-26-gb76a