Want to use xman on #FreeBSD? Start it this way to get manpages formatted right:
#!/bin/sh
export GROFF_NO_SGR=1
/usr/local/bin/xman
Before & after: https://computerfairi.es/media/4Ac1TAE-XvlGV9p_G0M https://computerfairi.es/media/9-5mWICKz0GBtbG1nXg
@arielmt Cool! Notes taken for reference on the #FreeBSD #Wiki: https://wiki.freebsd.org/Ports/x11/xman
@mpts Awesome! Thank you!
Related, xman relies on the MANPATH variable being set, but fresh installs don't set it (relying on /usr/bin/manpath as well instead). I recommend adding to the wiki page what I put in my ~/bin/xman script:
if [ -z "$MANPATH" ]; then export MANPATH=`manpath`; fi
@arielmt done, thanks!
I forgot to note why GROFF_NO_SGR needs to be set when starting xman on #FreeBSD:
During compiling, xman.c checks which OS it's being compiled on & hardwires `nroff -mandoc` as its page formatting aid if it detects the BSDs. However, nroff's mandoc macros output ANSI escape codes, while xman expects typewriter-style "back up & overstrike" codes.