mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
18 lines
452 B
Text
Executable file
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
|