questions regarding $PAGER

Dan Nelson dnelson at allantgroup.com
Tue Mar 15 07:14:44 PST 2005


In the last episode (Mar 14), Adam Michalak said:
> I am running FreeBSD 5.3-Release
> 
> I have a few questions regarding the pagers more and less. If I type
> "man more" at the prompt i get the man page for less are more and
> less now considered interchangeable?
> 
> When I do view a file with more my percentage of the file viewed is
> displayed in the bottom right hand screen.
> 
> However when I view a manpage the number of bytes viewed as opposed
> to percentage is displayed at the bottom right hand of the screen. 
> How can i set this so that percentage is displayed by default?

Manpages are stored compressed, so 'less' always gets input from stdin
and doesn't know the size of the document until you have hit the
bottom.  Load up a manpage, hit End, then Home, and you will see that
it now displays a percentage.  Searching for a string that doesn't
exist will also cause it to read the entire file and start giving you a
percentage.
 
> my output of echo $PAGER is more.

In that case, don't hit End, since when 'less' is emulating 'more', it
exits itself when you hit the end of the document :)  'more' is a Posix
standard command and isn't supposed to do that, though, so don't count
on that behaviour.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list