Enhancing the experience of manpages

Great stuff, but Man uses COLUMNS (number of characters fitting the line in the terminal) to calculate line breaks; Adding line numbers with -N to Less causes decreases the number of actually available columns in the terminal, breaking the page and causing much noise with a few characters long lines, as can be seen in the picture in the first reply.

I therefore suggest amending your alias to

alias manual='MANPAGER="less -XNR --line-num-width=4 --use-color -Dd+y -Du+208 -DN+r" COLUMNS=$((COLUMNS-5)) man'
2 Likes