aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/pager.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-15 14:53:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-15 14:53:36 +1200
commit8f3c9a45aad92b6a774290f677df8405d4960d93 (patch)
tree77da994ce79c7c46570bb36aa7eefe88702d43b1 /sh/profile.d/pager.sh
parent39e52143f8f198e93d36ef2037904e9f1613dfaf (diff)
downloaddotfiles-8f3c9a45aad92b6a774290f677df8405d4960d93.tar.gz
dotfiles-8f3c9a45aad92b6a774290f677df8405d4960d93.zip
Use less(1) as PAGER if available
Diffstat (limited to 'sh/profile.d/pager.sh')
-rw-r--r--sh/profile.d/pager.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/sh/profile.d/pager.sh b/sh/profile.d/pager.sh
new file mode 100644
index 00000000..2cbcb26d
--- /dev/null
+++ b/sh/profile.d/pager.sh
@@ -0,0 +1,7 @@
+# If we don't have less(1), we'll just use whatever pager the application or
+# system deems fit
+command less >/dev/null 2>&1 || return
+
+# Use less(1) as my PAGER
+PAGER=less
+export PAGER