Re: [DebianGIS] [GRASS-user] g.list pager
Daniel Victoria 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'. My personal preference is if not using 'more'
then use 'cat' or rip out the pager code all together. With 'more' if
you keep bashing expected keys you get back to the prompt. Also you can
scroll back in the terminal window without any clear-screens clobbering
the buffer. With 'less' you have to know to press the 'q' to get out,
which new non-unix users won't know. Also with 'less' there is the
disappearing text problem Daniel sees. Especially for g.list the output
is often less than a page-worth, so disappearing text isn't really
needed (and you can't cut and paste from it once it's gone).
> export LESS=-X
Ah, yes that works to keep the text from vanishing.
> 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.
Use .grass.bashrc for setting shell enviro variables instead. (or .bashrc)
If the Debian package is to continue to use 'less', I suggest putting
a note about this in the README.Debian file.