Summary Files CommitsBranches @commit@diff
diff options
context:
space:
mode:
Commit254c0a41afbe8890c94016746718c535c7144ca0 (patch )
AuthorSyndamia <kamen@syndamia.com>2024-11-08 07:53:40 +0200
CommitterSyndamia <kamen@syndamia.com>2024-11-08 07:53:40 +0200
Filesb5ed339b9186afed08239f40711ea7545125ba9f
dotfiles-254c0a41afbe8890c94016746718c535c7144ca0.tar
dotfiles-254c0a41afbe8890c94016746718c535c7144ca0.tar.gz
dotfiles-254c0a41afbe8890c94016746718c535c7144ca0.zip
Parentb9af2172694856931e63c768c5e7ad674006aa30 (diff)
feat(bash): left_cap now prints colors in a different way if we're not in high-color mode
1 files changed, 9 insertions, 3 deletions
-rw-r--r--.bashrc12
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"