diff options
| Commit | 0a934fd176a7540cf75e9ea5369748983bb6ec57 (patch) | |
|---|---|---|
| Author | 2026-05-25 16:56:25 +0300 | |
| Committer | 2026-05-25 16:56:25 +0300 | |
| Files | 428b229096df052edd374360fd667d90bc95aeec | |
| .files-0a934fd176a7540cf75e9ea5369748983bb6ec57.tar .files-0a934fd176a7540cf75e9ea5369748983bb6ec57.tar.gz .files-0a934fd176a7540cf75e9ea5369748983bb6ec57.zip | ||
| Parent | 2099bc2c7e5f8c31ea00d93786b43a0ca293a5ce (diff) | |
fix(.bashrc): No escape sequences on dumb terminals
1 files changed, 6 insertions, 2 deletions
| -rw-r--r-- | .bashrc | 8 |
@@ -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] |
