Bug 1028764

Summary: Manual pages are no longer colorized in less by LESS_TERMCAP_*
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: man-dbAssignee: Peter Schiffer <pschiffe>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: cjwatson, pschiffe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 15:00:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavel Raiskup 2013-11-10 14:55:12 UTC
I set something like that in my ~/.bashrc long time ago:

  man() {
    env \
    LESS_TERMCAP_mb=$(printf "\e[1;31m")        \
    LESS_TERMCAP_md=$(printf "\e[1;31m")        \
    LESS_TERMCAP_me=$(printf "\e[0m")           \
    LESS_TERMCAP_se=$(printf "\e[0m")           \
    LESS_TERMCAP_so=$(printf "\e[1;44;33m")     \
    LESS_TERMCAP_ue=$(printf "\e[0m")           \
    LESS_TERMCAP_us=$(printf "\e[1;32m")        \
    man "$@"
  }    
 
This used to make my manual pages to be colorized the way I like it.  But in
F20 it is not working.  I see that during rebase to man-db 2.6.4 there was
removed patch man-db-2.5.9-sgr.patch which was used to add '-c' option to
nroff.  That means, now I must add '-c' option to nroff in /etc/man_db.conf by
hand.

IIUC, this was pretty used trick for colorized manual pages.  Could we add the
patch back to make it work by default?  Or is there a better way to achieve
colorized manual pages?  (I see that reason for this patch was a little bit
different in history, see bug ##655385).

TIA, Pavel

Comment 1 Pavel Raiskup 2013-11-10 15:00:56 UTC
Ups, the referenced bug was giving a solution to me (I did not expect that it
was updated recently).  Exporting GROFF_NO_SGR=1.  Closing, sorry for noise.