[GRASS5] 'unsubscribe grass5'

Tinus Joubert tinus at netbus.co.za
Wed Apr 4 09:18:53 EDT 2001


----- Original Message -----
From: "Reinhard Brunzema" <r.brunzema at web.de>
To: <grass5 at geog.uni-hannover.de>
Sent: Wednesday, April 04, 2001 2:47 PM
Subject: Re: [GRASS5] Arrow keys and default pager


> "Eric G. Miller" schrieb:
> >
> > On Wed, Apr 04, 2001 at 10:43:26AM +0200, Reinhard Brunzema wrote:
> > >
> > > > Second issue: I see that the default pager for GRASS man pager is
> > > > "more",
> > > > but under linux the default pager is usually "less", much more
powerful
> > > > and easier to use. I'm getting tired of typing "export PAGER=less"
every
> > > > time I login in GRASS... couldn't it be a default option if "less"
is
> > > > available on the machine (at least under Linux)?
> > >
> > > Hallo,
> > > I had the same thoughts a couple of days before. A possible solution
> > > would be:
> > >
> > > Replacing the lines
> > > ---
> > >       # Set some environment variables if they are not set
> > >       if [ ! "$PAGER" ] ; then
> > >               PAGER=more
> > >               export PAGER
> > >       fi
> > > ---
> > > with
> > > ---
> > >       # Set some environment variables if they are not set
> > >       if [ ! "$PAGER" ] ; then
> > >               lesspath=`which less 2> /dev/null`
> > >               if [ -x "$lesspath" ] ; then
> > >                       PAGER=less
> > >               else
> > >                       PAGER=more
> > >               fi
> > >               export PAGER
> > >       fi
> >
> > The "which" command is not Bourne Shell (unfortunately).  I've seen
> > hacks to emulate it...
>
> Something like:
> ---
> # Search for a wish program
> WISH=
>
> for i in `echo $PATH | sed 's/^:/.:/
>                 s/::/:.:/g
>     s/:$/:./
>     s/:/ /g'`
> do
>     if [ -f $i/$GRASS_WISH ] ; then
>     WISH=$GRASS_WISH
> break
>     fi
> done
> ---
> (taken from Init.sh)
> I don't understand, why assuming "sed" is available is better than
> assuming "which" is available. Init.sh already uses several non-sh
> commands (sed, awk, grep, whoami). Why not "which"?
>
> Reinhard
>
> ----------------------------------------
> If you want to unsubscribe from GRASS Development Team mailing list write
to:
> minordomo at geog.uni-hannover.de with
> subject 'unsubscribe grass5'
>


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