#882570 bash: Color Prompt is Forced by bashrc color_prompt=yes outside of the force_color_prompt block

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Rob
Date:
2024-08-08 14:06:03 UTC
Severity:
minor
#882570#5
Date:
2017-11-24 02:12:17 UTC
From:
To:
Dear Maintainer,

The comments in the ~/.bashrc or /etc/skel/.bashrc file have force_color_prompt=yes commented
by default. So as I'm reading it I should not have a color prompt. However, the case statement

    29	# set a fancy prompt (non-color, unless we know we "want" color)
    30	case "$TERM" in
    31	    xterm-color|*-256color) color_prompt=yes;;
    32	esac

defines color_prompt=yes

So I end up with a color prompt as my $TERM matches. (In jessie the case was different and did not match).
I'm using the xterm on MacOS via SSH.

I expected to not have a color prompt unless I uncommented:
    36	#force_color_prompt=yes

Perhaps lines 30-32 could be commented out by default? Or move that case into the force_color_prompt if block.