From 2773bff058b34c4479c6009c187bf866f5ad28e2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 7 Jun 2024 20:24:07 +0800 Subject: [PATCH] fix condition regression introduced by previous linux console change bash-color-prompt was mistakenly always enable on linux console Also rename $prompt_color_force to $bash_prompt_color_force --- bash-color-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash-color-prompt.sh b/bash-color-prompt.sh index 492e72a..826da4e 100644 --- a/bash-color-prompt.sh +++ b/bash-color-prompt.sh @@ -4,7 +4,7 @@ # PROMPT_DIRTRIM=3 # only set for color terminals and if PS1 unchanged from bash or fedora defaults -if [ '(' "$PS1" = "[\u@\h \W]\\$ " -o "$PS1" = "\\s-\\v\\\$ " ')' -a "${TERM: -5}" = "color" -o "${TERM}" = "linux" -o -n "${prompt_color_force}" ]; then +if [ '(' "$PS1" = "[\u@\h \W]\\$ " -o "$PS1" = "\\s-\\v\\\$ " ')' -a '(' "${TERM: -5}" = "color" -o "${TERM}" = "linux" ')' -o -n "${bash_prompt_color_force}" ]; then PROMPT_COLOR="${PROMPT_COLOR:-32}" PROMPT_USERHOST="${PROMPT_USERHOST:-\u@\h}"