#|/bin/sh # .LESS_TERMCAP - set termcap properties for man and other less paging # What things in a manpage use which capabilities? # man and less use: # bold for headings, command synopses, and code font # underline for proper names (for example, “termcap” and “terminfo” in the # termcap manpage), variable names (“name”, “bp”, “id”, etc.), and type names # in some manpages (such as dispatch_queue_create(3)) # standout for the prompt at the bottom # It doesn’t seem like anything uses blinking. # termcap terminfo #LESS_TERMCAP_ks=$(tput smkx) # ks smkx make the keypad send commands #LESS_TERMCAP_ke=$(tput rmkx) # ke rmkx make the keypad send digits #LESS_TERMCAP_vb=$(tput flash) # vb flash emit visual bell #LESS_TERMCAP_mb=$(tput blink) # mb blink start blink #LESS_TERMCAP_md=$(tput bold) # md bold start bold LESS_TERMCAP_md=$(tput bold)$(tput setaf 4) # md bold set mode bold 4 set colour blue #LESS_TERMCAP_mh=$(tput dim) # mh dim mode half-bright #LESS_TERMCAP_mr=$(tput rev) # mr rev mode reverse video LESS_TERMCAP_me=$(tput sgr0) # me sgr0 reset attributes #LESS_TERMCAP_so=$(tput smso) # so smso start standout (reverse video) #LESS_TERMCAP_se=$(tput rmso) # se rmso stop standout #LESS_TERMCAP_us=$(tput smul) # us smul start underline LESS_TERMCAP_us=$(tput sitm)$(tput setaf 4) # us smul start underline set italic mode blue #LESS_TERMCAP_ue=$(tput rmul) # ue rmul stop underline LESS_TERMCAP_ue=$(tput ritm)$(tput sgr0) # ue rmul stop underline #LESS_TERMCAP_ZN=$(tput ssubm) # ZN ssubm set subscript mode #LESS_TERMCAP_ZV=$(tput rsubm) # ZV rsubm reset subscript mode #LESS_TERMCAP_ZO=$(tput ssupm) # ZO ssupm set superscript mode #LESS_TERMCAP_ZW=$(tput rsupm) # ZW rsupm reset superscript mode #LESS_TERMCAP_ZH=$(tput sitm) # ZH sitm set italic mode #LESS_TERMCAP_ZR=$(tput ritm) # ZR ritm reset italic mode GROFF_NO_SGR=1 # for terminals export \ LESS_TERMCAP_us LESS_TERMCAP_ue \ LESS_TERMCAP_md LESS_TERMCAP_me \ GROFF_NO_SGR # LESS_TERMCAP_mb LESS_TERMCAP_md \ # LESS_TERMCAP_mr LESS_TERMCAP_mh \ # LESS_TERMCAP_so LESS_TERMCAP_se \ # LESS_TERMCAP_ZN LESS_TERMCAP_ZV \ # LESS_TERMCAP_ZO LESS_TERMCAP_ZW \