2011-09-25 13:45:51 -04:00
|
|
|
#!/bin/sh
|
|
|
|
# This script tries to exec a pager by trying some known pagers if $PAGER is
|
|
|
|
# not set.
|
|
|
|
#
|
|
|
|
# Distributions/packagers can enhance this script with a
|
|
|
|
# distribution-specific mechanism to find the preferred pager.
|
2011-11-19 09:10:39 -05:00
|
|
|
[ -n "$PAGER" ] && which $PAGER >/dev/null && exec $PAGER "$@"
|
2011-09-25 13:45:51 -04:00
|
|
|
|
|
|
|
# Hopefully one of these is installed:
|
|
|
|
which most >/dev/null && exec most "$@"
|
|
|
|
which less >/dev/null && exec less "$@"
|
|
|
|
# we don't use 'more' because it will exit if the file is 'too short'
|
|
|
|
|
|
|
|
# If no pager is installed, try an editor
|
|
|
|
exec i3-sensible-editor "$@"
|