[rec.games.hack] Nethack 3.0 and PAGER

brian@radio.astro.utoronto.ca (Brian Glendenning) (07/25/89)

Nethack 3.0 will use the environment variable PAGER, if it exists.
Unfortunately it won't apply any path to it (it is fairly common
around here to just specify PAGER as less, since it often resides in
different  places, that way only the PATH line has to be changed in
your dot files).

An easy fix is to do something like:

*** nethack.sh	Mon Jul 24 23:14:50 1989
--- nethack.sh~	Mon Jul 24 22:58:51 1989
***************
*** 1,25 ****
  #!/bin/sh
  #	SCCS Id: @(#)nethack.sh	1.4	87/08/08
- 
  HACKDIR=/usr/games/lib/nethackdir
  HACK=$HACKDIR/nethack
  MAXNROFPLAYERS=4
  
  cd $HACKDIR
- # Make sure the PAGER environment variable is a complete path or
- # help etc will barf since it won't be able to exec it.
- if [ $PAGER ]
- then
- 	if [ ! -f $PAGER ]
- 	then
- 		PAGER=`which $PAGER`; export PAGER
- 	fi
- 	if [ ! -f $PAGER ]
- 	then
- 		echo Cannot find PAGER - unsetting it
- 		unset PAGER
- 	fi
- fi
  case $1 in
  	-s*)
  		exec $HACK $@
--- 1,10 ----

--
	  Brian Glendenning - Radio astronomy, University of Toronto
brian@radio.astro.utoronto.ca uunet!utai!radio!brian  glendenn@utorphys.bitnet