Closed mobotsar closed 1 year ago
Use a decent man pager. Here is how it looks on my system.
Here is the script I use as a manpager
#!/usr/bin/env python3
import os
# Blink -> Bold + GREEN
os.environ['LESS_TERMCAP_mb'] = "\033[1;32m"
# Bold -> Bold + CYAN
os.environ['LESS_TERMCAP_md'] = "\033[1;36m"
# Reset all attributes
os.environ['LESS_TERMCAP_me'] = "\033[0m"
# Standout -> Bold + yellow on blue
os.environ['LESS_TERMCAP_so'] = "\033[1;33;44m"
# End standout
os.environ['LESS_TERMCAP_se'] = "\033[22;39;49m"
# Underline -> Italic + red
os.environ['LESS_TERMCAP_us'] = "\033[3;31m"
# End underline
os.environ['LESS_TERMCAP_ue'] = "\033[23;39m"
# Dim mode
os.environ['LESS_TERMCAP_mh'] = "\033[90m"
os.execlp('less', 'less', '-R')
I get that man pages are lower priority, but I shouldn't need to reconfigure my environment and know the exact ANSI code magic of your system to get a man page to render. This behavior is the out-of-the-box experience (with less
) and persists with more
, bat
, and most
, all of which are "decent" pieces of software — it seems like something worth addressing.
I am afraid I have no interest in degrading the man pages to conform to whatever broken out-of-the-box experience the default less provides.
Simply using less -R
as your manpager is sufficient.
And, these arent "custom ANSI codes specific to my system". They are standard ANSI codes respected by 99% of terminals out there. Use them or your own preferences, or use the HTML documentation instead.
To fix the table borders I changed center;
to box center;
and removed the vertical and horizontal rules (lines) that were used as the table borders.
The table borders were messed up in foot
as well, in both terminals which tables were rendered incorrectly depended on the window size, with certain sizes everything was okay.
After the fix no problems in either terminal with any window size.
And to add colors I had to export GROFF_NO_SGR=1
.
GROFF_NO_SGR is required now because of groff 1.23.0 disabling the sgr device output control. https://groups.google.com/g/linux.debian.bugs.dist/c/kC77yp3mL4M
As for the table formatting, it might be worth reporting the issue upstream to sphinx which is what kitty uses to build the man pages.
Upstream bug report: https://sourceforge.net/p/docutils/bugs/475/
Describe the bug Parts of the table meant to contain info in the "Tabs" section are somehow malformed. When viewing from within kitty, it's transposed downward into "Windows" and overlapping content in that section. When viewing in gnome-terminal (and other vte terminals such as tilix), they appear to be missing altogether.
To Reproduce Just run
man kitty
.Environment details
Additional context This is with no configuration specified, i.e. the bug is reproducible immediately after installing kitty.
Screenshots Gnome Terminal: Kitty: