[GRASS5] PAGER changed to GRASS_PAGER

Glynn Clements glynn.clements at virgin.net
Mon May 7 09:39:02 EDT 2001


Markus Neteler wrote:

> > > Of course we should experiment too much now... However, I dislike the
> > > "less" behaviour in i.group and others, if you "list" the existing
> > > groups. reason: "less" doesn't exit immediately but waits for the user
> > > pressing "q" to quit. That's very inconvenient. If I switch to "more",
> > > the available groups are listed and "more" is left.
> > 
> > Does setting GRASS_PAGER to "less -F" help? From the less manpage:
> > 
> >        -F or --quit-if-one-screen
> >               Causes less to automatically  exit  if  the  entire
> >               file can be displayed on the first screen.
> > 
> > Or does this screw other cases?
> 
> Glynn,
> 
> no, this doesn't work:
> 
> if you run "i.group" and enter "list" into the first screen, you
> would get:
> 
> hit RETURN to continue -->
> 
> 
> instead of (using "more"):
> 
> Available groups
> ---------------------------------
> no group files available
> ---------------------------------
> hit RETURN to continue -->
> 
> The less -F erases the screen when quiting while more keeps it.

Hmm; that seems to make "less -F" pretty useless.

In which case, there are two choices; either:

a) users who set GRASS_PAGER to "less" accept its behaviour "for
better or for worse", or

b) we "split" GRASS_PAGER into e.g. GRASS_SHORT_PAGER and
GRASS_LONG_PAGER, and pick one or the other depending upon the likely
amount of output. The former would always default to "more" whilst the
latter would default to $PAGER.

Actually, we should have another one to determine the pager used by
the library functions (with a note that pointing it at a curses
program "voids your warranty"). That way, those of us with terminal
emulators which *do* have scrollback buffers can use "/bin/cat" there
as well.

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list