GNOME Bugzilla – Bug 774070
[PATCH] Try both terminfo and termcap names when running tput
Last modified: 2016-11-09 13:55:53 UTC
JHBuild cannot print bold text on FreeBSD because 'tput bold' command always fails. The attached patch fixes it by trying both 'tput bold' (terminfo name) and 'tput md' (termcap name). It also fixes t_reset and t_colour.
Created attachment 339265 [details] [review] terminal: Try both terminfo and termcap names when running tput FreeBSD doesn't have a terminfo database, and its tput command only support termcap names. To make bold text works on more systems, we try both terminfo and tercap names before giving up and using normal text. This commit also adds terminfo 'setaf' as an alternative to 'setf' because it seems that the latter only works with xterm, not with other popular terminals such as xterm-256color and screen.
Review of attachment 339265 [details] [review]: OK
Attachment 339265 [details] pushed as 9ea2b62 - terminal: Try both terminfo and termcap names when running tput