OS: Fedora 40 Workstation
Desktop: KDE Plasma 6.1.2 under Wayland
Issue: the bash prompt (PS1) has color in some terminals like Konsole, QTerminal, WezTerm…, etc., while it has no color on Alacritty and Contour
After talking to both alacritty and contour devs, it seems the issue is from bash
I have the bash-color-prompt package installed, and the TERM env var hasn’t been modified
Set prompt_color_force (before sourcing /etc/bashrc or bash-color-prompt.sh directly) to turn on bash-color-prompt unconditionally, otherwise by default it is only setup cautiously for a bash shell if $TERM ends in “color” and PS1 is the fedora or bash default.
For example:
if [ -t 0 ]; then
prompt_color_force=1
source /etc/profile.d/bash-color-prompt.sh
fi
can be added to ~/.bashrc to turn on bash-color-prompt “everywhere”.