I saw this question where the answerer uses termcap to define colors for less which then could be used for how man could be displayed. It said while termcap is obsolete, it's easier while terminfo is more complicated.
Could anybody share how this similar setting could be done using terminfo ?
$ cat ~/.LESS_TERMCAP export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan export LESS_TERMCAP_me=$(tput sgr0) export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue export LESS_TERMCAP_se=$(tput rmso; tput sgr0) export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white export LESS_TERMCAP_ue=$(tput rmul; tput sgr0) export LESS_TERMCAP_mr=$(tput rev) export LESS_TERMCAP_mh=$(tput dim) export LESS_TERMCAP_ZN=$(tput ssubm) export LESS_TERMCAP_ZV=$(tput rsubm) export LESS_TERMCAP_ZO=$(tput ssupm) export LESS_TERMCAP_ZW=$(tput rsupm)
Obviously, the first thing that would change would be the name, it would be .LESS_TERMINFO. Apart from that have no idea.
I did try to read/parse terminfo page but didn't make much sense to me except for that it uses ncurses which IIRC also uses quite a bit of color, although I don't know if that's relevant or not.
Can anybody help share equivalent bits for .TERMINFO definitions for colors in less ?