]> git.sur5r.net Git - i3/i3/blobdiff - i3-sensible-editor
Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager}
[i3/i3] / i3-sensible-editor
index dffe00d59360eaffb04b7ba3b51671d8b54a8745..d71a440bb1fe0c5c408ca8e18883f8ed114bb592 100755 (executable)
@@ -4,8 +4,8 @@
 #
 # Distributions/packagers can enhance this script with a
 # distribution-specific mechanism to find the preferred pager.
-which $VISUAL >/dev/null && exec $VISUAL "$@"
-which $EDITOR >/dev/null && exec $EDITOR "$@"
+[ -n "$VISUAL" ] && which $VISUAL >/dev/null && exec $VISUAL "$@"
+[ -n "$EDITOR" ] && which $EDITOR >/dev/null && exec $EDITOR "$@"
 
 # Hopefully one of these is installed (no flamewars about preference please!):
 which nano >/dev/null && exec nano "$@"