[Apachetoolbox-devel] paging revisited
Brought to you by:
bryanandrews
|
From: Toni M. <su...@oe...> - 2002-07-12 18:43:41
|
Hi,
well, i've just hacked something non-functional on etc/functions.conf
which should enable paging. Somehow it doesn't work, only I don't
know why...
here goes:
+ print_descriptions
+ P=cat
+ '[' X/bin/less '!=' X ']'
+ P=/bin/less
+ eval '/bin/less /home/toni/mnt/web/ATB/Apachetoolbox-1.5.58/etc/help'
++ /bin/less /home/toni/mnt/web/ATB/Apachetoolbox-1.5.58/etc/help
There is no -/ option ("less --help" for help)
+ echo 'See /home/toni/mnt/web/ATB/Apachetoolbox-1.5.58/etc/help for more info.'
See /home/toni/mnt/web/ATB/Apachetoolbox-1.5.58/etc/help for more info.
+ HitAnyKey
The function print_descriptions reads like this:
#shows the help file for all the mods
print_descriptions()
{
### find pager if possible:
P=cat
if [ X"${PAGER}" != X ]; then
P=${PAGER}
else
for i in /usr/bin/less /usr/local/bin/less \
/bin/less /usr/bin/more /bin/more ; do
if [ -x $i ]; then
P=$i
break
fi
done
fi
eval "$P $root/etc/help"
echo "See $root/etc/help for more info."
}
The intention was to check for some common pagers in common locations
if the variable PAGER is empty, and default to 'cat' if nothing is
found/present. Where on earth less gets that '-/' idea from, I have
no idea :(
Best,
--Toni++
|