No. I read man 5 terminfo
to find out what the terminal ESCape sequences (what you send the terminal to cause the behavior) dealing with italics were called:
man 5 terminfo | egrep 'italics|Cap-|Code'|head -n 10| tail -n 4
Variable Cap- TCap Description
String name Code
enter_italics_mode sitm ZH Enter italic mode
exit_italics_mode ritm ZR End italic mode
Then, I used infocmp
to dump each terminal description so I could see which terminals supported italics:
for i in $( find /usr/share/terminfo -type f ) ; do
j=${i##*/}; hdr="$( infocmp $j | head -n 1)";
infocmp $j | egrep -q 'sitm|ZH'
if [ $? = 0 ] ; then echo $hdr; fi;
done
# Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt-unicode-256color
# Reconstructed via infocmp from file: /usr/share/terminfo/o/opus3n1+
# Reconstructed via infocmp from file: /usr/share/terminfo/i/iris-color
So, these three terminal-types (rxvt-unicode-256color, opus3n1+, iris-color) support italics. Others do not.
Since I could not find a terminal definition for "gnome-terminal" (see ls /usr/share/terminfo/g/
, I looked for italics in all. Try infocmp $TERM
to see what capabilities your terminal supports. Read man tput
to see how to emit control sequences.
\e[3m
Terminal that supports ANSI italic escape code?