aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 00:03:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 00:03:45 +1200
commit4fcb4a1c6b6f6cc247f4ad93fbadcf1fe9b3e4ff (patch)
tree0f864ccb23ad9f8e8d2ab2aaef316693169c76ff
parentf21228105d3b5553058b340486e10daabd1fbaab (diff)
downloaddotfiles-4fcb4a1c6b6f6cc247f4ad93fbadcf1fe9b3e4ff.tar.gz
dotfiles-4fcb4a1c6b6f6cc247f4ad93fbadcf1fe9b3e4ff.zip
Set xgo(1) to load text/plain docs in $PAGER
-rwxr-xr-xbin/xgo5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/xgo b/bin/xgo
index e808027c..b2ff906a 100755
--- a/bin/xgo
+++ b/bin/xgo
@@ -26,6 +26,11 @@ for url ; do (
image/*)
curl -- "$url" | feh - && exit
;;
+ text/plain)
+ # shellcheck disable=SC2016
+ urxvt -e sh -c 'curl -- "$1" | "${PAGER:-more}"' \
+ _ "$url" && exit
+ ;;
esac
# Otherwise, just pass it to br(1)