aboutsummaryrefslogtreecommitdiff
path: root/i3-sensible-pager
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2015-11-24 13:15:31 +0000
committerTobias Bucher <tobiasbucher5991@gmail.com>2015-11-30 21:36:23 +0000
commita5b2c91c93c0f8a1b51b09563efc554a7cce87f0 (patch)
tree3a45aaa066430fa125c1abee5bdd3d3f78e98093 /i3-sensible-pager
parenta2b20c8d9a57c636e4bffcfc206402c678abf4ce (diff)
downloadi3-a5b2c91c93c0f8a1b51b09563efc554a7cce87f0.tar.gz
i3-a5b2c91c93c0f8a1b51b09563efc554a7cce87f0.zip
Quote the variables in i3-sensible-* correctly
Previously, the variables $EDITOR, $PAGER, $TERMINAL and $VISUAL got shell-expanded twice before executing them.
Diffstat (limited to 'i3-sensible-pager')
-rwxr-xr-xi3-sensible-pager6
1 files changed, 3 insertions, 3 deletions
diff --git a/i3-sensible-pager b/i3-sensible-pager
index ce71686b..386e2988 100755
--- a/i3-sensible-pager
+++ b/i3-sensible-pager
@@ -11,8 +11,8 @@
# Hopefully one of these is installed (no flamewars about preference please!):
# We don't use 'more' because it will exit if the file is too short.
# Worst case scenario we'll open the file in your editor.
-for pager in $PAGER less most w3m pg i3-sensible-editor; do
- if command -v $pager > /dev/null 2>&1; then
- exec $pager "$@"
+for pager in "$PAGER" less most w3m pg i3-sensible-editor; do
+ if command -v "$pager" > /dev/null 2>&1; then
+ exec "$pager" "$@"
fi
done