diff options
| author | Syndamia <kamen@syndamia.com> | 2024-11-08 07:53:40 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2024-11-08 07:53:40 +0200 |
| commit | 254c0a41afbe8890c94016746718c535c7144ca0 (patch) | |
| tree | b5ed339b9186afed08239f40711ea7545125ba9f | |
| parent | b9af2172694856931e63c768c5e7ad674006aa30 (diff) | |
| download | dotfiles-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
| -rw-r--r-- | .bashrc | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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" |
