[GRASS5] GRAS_PAGER
Helena Mitasova
hmitaso at unity.ncsu.edu
Thu Mar 10 11:43:23 EST 2005
I have recently tried GRASS6 on Mac and MSWindows and found that
GRASS_PAGER uses less instead of more, which is very incovenient
(and for some people confusing, because you have to type q after
running g.list to get your grass prompt back). Is there a reason
why it cannot be set as Lorenzo suggests and why is there the
less alternative? (see my guess below) People who haven't used
GRASS before would not realize that this behavior can be changed
as Hamish suggests below.
thanks for any hints,
Helena
Lorenzo suggests:
>
> It's more useful add this env in lib/init/init.sh
>
> row 28
> + GRASS_PAGER=more
> + export GRASS_PAGER
> or no ?
My answer:
Lorenzo,
it is there already and it looks like it uses less if it cannot find
more under /bin ???
173 # Once the new environment system is committed we can delete these
lines
174 # Export the PAGER environment variable for those who have it
set
175 if [ "$PAGER" ] ; then
176 export PAGER
177 fi
178
179 # Set some environment variables if they are not set
180 if [ ! "$GRASS_PAGER" ] ; then
181 if [ -x /bin/more ] ; then
182 GRASS_PAGER=more
183 else
184 GRASS_PAGER=less
185 fi
186 export GRASS_PAGER
Lorenzo Moretti wrote:
>
> Hi Elena
>
> > Lorenzo,
> >
> > I just got some hints from Hamish - it is defined by environmental
> > variable so I should be able to change it. But it would be nice to
> > have it as default.
> >
> > thank you for a quick answer,
> >
> > Helena
> >
> > Hamish says:
> >
> > ......yes, the GRASS_PAGER environmental variable.
> >
> > Mac binaries use "less" by default as well..
> >
> > run this:
> >
> > echo "export GRASS_PAGER=more" >> ~/.grass.bashrc
> >
> > (Mac OSX 10.2 uses csh so use setenv and .grass.cshrc there)
> >
> > see this thread too for a GUI option:
>
> > http://thread.gmane.org/gmane.comp.gis.grass.devel/6573
More information about the grass-dev
mailing list