Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit0a934fd176a7540cf75e9ea5369748983bb6ec57 (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-05-25 16:56:25 +0300
Committer
 Syndamia <kamen@syndamia.com>
2026-05-25 16:56:25 +0300
Files428b229096df052edd374360fd667d90bc95aeec
.files-0a934fd176a7540cf75e9ea5369748983bb6ec57.tar
.files-0a934fd176a7540cf75e9ea5369748983bb6ec57.tar.gz
.files-0a934fd176a7540cf75e9ea5369748983bb6ec57.zip
Parent2099bc2c7e5f8c31ea00d93786b43a0ca293a5ce (diff)
fix(.bashrc): No escape sequences on dumb terminals
1 files changed, 6 insertions, 2 deletions
-rw-r--r--.bashrc8
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]