summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2024-11-08 07:53:40 +0200
committerSyndamia <kamen@syndamia.com>2024-11-08 07:53:40 +0200
commit254c0a41afbe8890c94016746718c535c7144ca0 (patch)
treeb5ed339b9186afed08239f40711ea7545125ba9f /.bashrc
parentb9af2172694856931e63c768c5e7ad674006aa30 (diff)
downloaddotfiles-254c0a41afbe8890c94016746718c535c7144ca0.tar
dotfiles-254c0a41afbe8890c94016746718c535c7144ca0.tar.gz
dotfiles-254c0a41afbe8890c94016746718c535c7144ca0.zip
feat(bash): left_cap now prints colors in a different way if we're not in high-color mode
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc12
1 files changed, 9 insertions, 3 deletions
diff --git a/.bashrc b/.bashrc
index 14a67d4..64a7efd 100644
--- a/.bashrc
+++ b/.bashrc
@@ -25,9 +25,15 @@
[ "$1" = 'o' -o -z "$1" ] && set "$PS_USER_BG" "$2"
[ "$2" = 'o' -o -z "$2" ] && set "$1" "$PS_LEFT_SEMI"
- colors_prt "$1" "$PS_BG"
- printf "$2"
- colors_prt "$PS_FG" "$1"
+ if hc_mode
+ then
+ colors_prt "$1" "$PS_BG"
+ printf "$2"
+ colors_prt "$PS_FG" "$1"
+ else
+ colors_prt "$PS_FG" "$1"
+ printf "$2"
+ fi
}
right_cap() {
[ "$2" = 'o' -o -z "$2" ] && set "$1" "$PS_RIGHT_SEMI"