Problems with man and less/more

Oliver Fromme olli at
Wed Nov 15 02:37:35 PST 2006

Ian Smith wrote:
 > Jeremy Chadwick wrote:
 > > Oliver Fromme wrote:
 > > > Just set $PAGER appropriately.  By the way, the default
 > > > (if not set) is "more -s", which is the same as "less -s".
 > > > Therefore, piping output from man(1) through less(1)
 > > > doesn't really make sense.
 > > 
 > > Maybe this should be done by the default in /etc/profile and
 > > /etc/csh.cshrc for people who don't override it?

Those people will get the default behaviour already, so I
don't think it's necessary to set $PAGER to anything.  In
fact, it might be confusing to do so.

 > more and less don't behave quite the same though;

Right, less(1) enters a compatibility mode if called as
"more".  Sorry, I forgot about that because I have an
alias more=less for ages.  :-)

 > I always set $PAGER to
 > less explicitly in ~/.cshrc (albeit with some extra options) because as
 > more, getting to the bottom of a file quits, where less requires 'q' to
 > exit - handy if, say, running '!man something' from inside less ..

Beside the alias more=less, I have the following environment
variables set in my ~/.zshrc:


Among other things, those options will make less(1) quit
automatically when it hits the bottom of a file for the
_second_ time in a row, which is very convenient, and it
makes the prompt line more verbose (display file name,
line numbers and percentage).

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD:
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"That's what I love about GUIs: They make simple tasks easier,
and complex tasks impossible."
        -- John William Chambless

More information about the freebsd-stable mailing list