The implementation of this solution has a bug. The variable that you leave to uncomment in the bashrc skel is force_colored_prompt. The variable you later check for is force_color_prompt.
The implementation of this solution has a bug. prompt. The variable you later check for is force_color_prompt.
The variable that you leave to uncomment in the bashrc skel is force_colored_