If you toggle the
-N switch within
less, it displays line numbers. However, there seems to be an unnecessarily generous amount of padding added, even when the total lines is small. E.g. the output of
man less with line numbers enabled is:
1 LESS(1) 2 3 NAME 4 less - opposite of more 5 6 SYNOPSIS 7 less -? 8 less --help 9 less -V 10 less --version 11 less [-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~] ... 940 Version 487: 25 Oct 2016
Is there a way to control or reduce that padding to the least amount necessary for the total number of lines?
I know I could go for a programmatic solution (e.g. piping into
cut etc), but I'm wondering if there's some sort of switch or configuration parameter I'm ignorant of that controls this behaviour.