dots/commonsh/10_pager
David Alexander Majnemer b3c9a9c6e9 - fixed a bug here and there
- made it fully sh compliant (works even with solaris sh)
2009-01-03 14:15:00 -06:00

18 lines
452 B
Text
Executable file

for PAGER in less more pg ; do
(command -v $PAGER > /dev/null 2>&1) && break
done
export PAGER
# if we are in less, we can set some options and use lesspipe
if [ $PAGER = less ] ; then
# lesspipe can go by either lesspipe or lesspipe.sh
for lesspipe in lesspipe lesspipe.sh ; do
if (command -v $lesspipe > /dev/null 2>&1) ; then
eval `SHELL=/bin/sh $lesspipe` && break
fi
done
# let less be case insensitive
LESS='-R -M'
export LESS
fi