]> git.sur5r.net Git - i3/i3/blob - i3-sensible-pager
Merge branch 'master' into next
[i3/i3] / i3-sensible-pager
1 #!/bin/sh
2 # This script tries to exec a pager by trying some known pagers if $PAGER is
3 # not set.
4 #
5 # Distributions/packagers can enhance this script with a
6 # distribution-specific mechanism to find the preferred pager.
7 [ -n "$PAGER" ] && which $PAGER >/dev/null && exec $PAGER "$@"
8
9 # Hopefully one of these is installed:
10 which most >/dev/null && exec most "$@"
11 which less >/dev/null && exec less "$@"
12 # we don't use 'more' because it will exit if the file is 'too short'
13
14 # If no pager is installed, try an editor
15 exec i3-sensible-editor "$@"