Inside tmux, the program that produced the output on your screenshots "thinks" the terminal does not support italic mode. The program does not try to use italics, it chooses to manipulate background color instead.
This is because screen-256color
you specified apparently does not support italic mode. There's a way to confirm this. In my Kubuntu the following command
TERM=screen-256color infocmp -1 | grep -E 'ritm|sitm'
produces empty output (no support), while
TERM=tmux-256color infocmp -1 | grep -E 'ritm|sitm'
gives us escape sequences to enter (sitm
) or exit (ritm
) italic mode (see man 5 terminfo
).
Any program that queries the terminfo database will see that screen-256color
does not support italic mode. To convince programs that your terminal does support it, you need to choose something with the support.
Hopefully your terminfo database contains tmux-256color
. This is the right value of $TERM
for you. Solution: use tmux-256color
instead of screen-256color
.
TERM=screen-256color
is for thescreen
command.TERM=tmux=256color
is for thetmux
command – Chris Davies May 19 '23 at 16:16.tmux.conf
– Solvemon Feb 15 '24 at 09:15