diff options
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index d4ec0645..4c82cec0 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -49,15 +49,20 @@ prompt() { # Check if we have non-bold bright green available 256) format=$( { - tput AF 10 || tput setaf 10 \ - || tput AF 10 0 0 || tput setaf 10 0 0 + : "${PROMPT_COLOR:=10}" + tput AF "$PROMPT_COLOR" \ + || tput setaf "$PROMPT_COLOR" \ + || tput AF "$PROMPT_COLOR" 0 0 \ + || tput setaf "$PROMPT_COLOR" 0 0 } 2>/dev/null ) ;; # If we have only eight colors, use bold green 8) format=$( { - tput AF 2 || tput setaf 2 + : "${PROMPT_COLOR:=2}" + tput AF "$PROMPT_COLOR" \ + || tput setaf "$PROMPT_COLOR" tput md || tput bold } 2>/dev/null ) ;; |