[GRASS-user] g.list pager

Glynn Clements glynn at gclements.plus.com
Tue Jul 24 15:52:26 EDT 2007


[CC to grass-dev]

Hamish wrote:

> > > I recall that some time ago, when I issued "g.list rast" I would get
> > > the list of rasters and the command prompt right after it. Now, when
> > > I run the command I get the raster list and no command prompt. I
> > > have to hit q to get back to the prompt and the raster list is gone,
> > > just like when reading a man page. I tried to change GRASS_PAGER env
> > > to more, cat but nothing happened. What am I doing wrong? I'm using
> > > Debian
> 
> Paul Kelly wrote:
> > Yes, setting GRASS_PAGER to cat should give you the behaviour you 
> > describe, I think. Are you sure it was set properly?
> 
> Debian packaging rules state that the default pager will be 'less', not
> GRASS's default of 'more'.

IMHO, the default value of GRASS_PAGER ought to be $PAGER, if that is
set.

> My personal preference is if not using 'more'
> then use 'cat' or rip out the pager code all together.

Some people might actually need the pager, so I wouldn't recommend
removeing the code. Those who don't want a pager can always use
GRASS_PAGER=cat (as I do).

> > Funny thing is that the pager is set correctly at the .grassrc6 file
> > but grass ignores it. Will have to put it on bashrc
> 
> .grassrc6 is not what you expect. It holds the g.gisenv GIS variables,
> it's not a shell script containing commands like .bashrc is.

We should change the name for 7.x. It isn't an "rc" file in the
conventional sense.

> Use .grass.bashrc for setting shell enviro variables instead. (or .bashrc)

Note that ~/.grass.bashrc only affects the interactive shell which is
spawned from Init.sh; it doesn't affect the operation of Init.sh
itself. For that, use ~/.bashrc (or similar).

It might be worth having a separate rc file which is sourced from the
top of Init.sh. Also, on the subject of potential Init.sh changes, I'd
suggest getting rid of the $HOME "games" and just setting HISTFILE to
put the history file in the mapset directory (AFAICT, that is the
primary purpose of the $HOME stuff).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list