[GRASS5] Re: [bug #750] (grass) g.manual problem

Hi Markus

Markus Neteler via RT wrote:

here it works fine. Be sure that you have eliminated the (old) binary
version of g.manual. Check

which g.manual
/usr/local/grass5/scripts/g.manual

that you use the script version. What does

echo $GRASS_PAGER
more

tell you?

The following is a sample run from Grass built yesterday from an update
of the release branch, followed by

make uninstall
make clean
make
make install

Note that this was obtained by selecting the text on the terminal
window, and then pasting it in my mail composer window.

Mapset <PERMANENT> in Location <jhickey>
GRASS 5.0.0pre1 > g.manual -1
                                                                       
Mapset <PERMANENT> in Location <jhickey>
GRASS 5.0.0pre1 > which g.manual
/tmp/grass/grass5/scripts/g.manual
                                                                       
Mapset <PERMANENT> in Location <jhickey>
GRASS 5.0.0pre1 > echo $GRASS_PAGER
more
                                                                       
Mapset <PERMANENT> in Location <jhickey>
GRASS 5.0.0pre1 > g.manual -a
                                                                       
Mapset <PERMANENT> in Location <jhickey>
GRASS 5.0.0pre1 >

As you can see, the -1 and -a options do nothing for me. I haven't had
time to look at this yet, any hints on where to start?

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

Justin Hickey wrote:

As you can see, the -1 and -a options do nothing for me. I haven't had
time to look at this yet, any hints on where to start?

g.manual fails if PAGER is unset:

  if [ "$opt1" ]
  then
    /bin/ls $GISBASE/man/man1 | $PAGER
    exit 0
  elif [ "$opta" ]
  then
    /bin/ls -C $GISBASE/man/man1 | $PAGER
    exit 0
  fi

This needs to be changed to $GRASS_PAGER; presumably the global change
of PAGER to GRASS_PAGER overlooked the scripts.

--
Glynn Clements <glynn.clements@virgin.net>

Hi Glynn

Glynn Clements wrote:

Justin Hickey wrote:

> As you can see, the -1 and -a options do nothing for me. I haven't
> had time to look at this yet, any hints on where to start?

g.manual fails if PAGER is unset:

  if [ "$opt1" ]
  then
    /bin/ls $GISBASE/man/man1 | $PAGER
    exit 0
  elif [ "$opta" ]
  then
    /bin/ls -C $GISBASE/man/man1 | $PAGER
    exit 0
  fi

This needs to be changed to $GRASS_PAGER; presumably the global
change of PAGER to GRASS_PAGER overlooked the scripts.

Yep, you're right. That was it. Thanks for the fix. I'll update the CVS
tree and I checked for other instances of PAGER in src/scripts but did
not find any.

Thanks again.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!