Re: less at end of file

2010-12-13 Thread Oliver Fromme
Chris Turner c.tur...@199technologies.org wrote:
  Jeremy C. Reed wrote:
   less is not more. man uses more by default.
  
  you can:
  
  export PAGER=less
  or
  setenv PAGER less
  
  to change the man(1) behavior, btw.

Just for completeness, if you rather want the opposite
behaviour, i.e. less to behave like traditional more,
you can do this:

export LESS_IS_MORE=1

Of course, you can configure the behaviour when hitting
end-of-file with the -e and -E options.  You can put
them in the LESS environment variable (or MORE if you
use the more compatibility mode) or in the .lesskey
file.  See the less(1) and lesskey(1) manual pages for
details.

Best regards
   Oliver

PS:  For inspiration, here's an excerpt from my personal
.lesskey file (actually there are more key bindings) ...

#command
\e[ggoto-mark \^
g   goto-mark \^
#env
LESS= -Meiqa -\#8 -j.5 -z-4
LESSCHARSET = latin1
LESSOPEN= |/usr/bin/lesspipe.sh %s


-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd


Re: less at end of file

2010-12-12 Thread Chris Turner

Jeremy C. Reed wrote:

less is not more. man uses more by default.


you can:

export PAGER=less
or
setenv PAGER less

to change the man(1) behavior, btw.



Re: less at end of file

2010-12-11 Thread Jeremy C. Reed
On Sat, 11 Dec 2010, Pierre Abbat wrote:

 When less gets to the end of file, sometimes it exits, sometimes it 
 doesn't. If I run man less, it exits at end (this is the -e or -E 
 option), but if I run man less |less, it doesn't. On Linux (at least 
 all the distros I've used), it doesn't exit at EOF. How come it does 
 on DFly?

less is not more. man uses more by default. more and less are same 
binary (but as you can see behaves differently depending which is 
called.) This is historical behavior going back to more of 3BSD and 
appears to be same behavior of its predecessor, cr3.