diff options
Diffstat (limited to '.bashrc')
| -rw-r--r-- | .bashrc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -33,10 +33,15 @@ export PROMPT_COMMAND="shell_var_fix;" # $1 foreground color [REQUIRED] # $2 background color [REQUIRED] colors_prt() { - printf "\001\e[38;5;${1}m\e[48;5;${2}m\002" + if hc_mode + then + printf "\001\e[38;5;${1}m\e[48;5;${2}m\002" + else + printf "\001\e[${1}m\e[${2}m\002" + fi } colors_res() { - printf "\001\e[39m\e[49m\002" + printf "\001\e[0m\002" } # $1 cap colour [OPTIONAL] @@ -194,6 +199,7 @@ export PROMPT_COMMAND="shell_var_fix;" } ps_precursor() { + colors_res [ ! -w . ] && colors_prt "$PS_WARN" "$PS_BG" if [ -n "$___changes" ] then |
