[GRASS5] PAGER changed to GRASS_PAGER

Markus Neteler neteler at geog.uni-hannover.de
Mon May 7 05:15:20 EDT 2001


On Sat, May 05, 2001 at 12:34:49AM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > > > I would suspect that most of the actual programs can be changed,
> > > > although more consideration needs to be given to library functions. 
> > > > It seems conceivable that spawning "less" in the wrong place (e.g.
> > > > from within an interactive program) might cause problems.
> > > 
> > > Hmmm. Then we probably should list this as a TODO item and leave
> > > changing "more" to "GRASS_PAGER" until after 5.0. Markus, any comments?
> > 
> > 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.

> In any case, I wasn't suggesting hard-coding "more" in cases where
> "less" was "not ideal". I was more concerned about the possibility of
> it trashing terminal settings. I don't see this as an issue within
> individual programs; If it occurs, the program can be modified to
> reset the terminal to the desired state afterwards.
> 
> I was more concerned about ensuring that library functions don't have
> undesirable side effects.
Yes, agreed. Thanks for the other fixes. This problem seems not to be
trivial...

Markus

---------------------------------------- 
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