X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=i3-sensible-editor;h=d71a440bb1fe0c5c408ca8e18883f8ed114bb592;hp=dffe00d59360eaffb04b7ba3b51671d8b54a8745;hb=ee43861fc412d37585f43ea085d4c498376d0fdf;hpb=0ffcc00b1515fd109dbb95a750d7ada68679b04b diff --git a/i3-sensible-editor b/i3-sensible-editor index dffe00d5..d71a440b 100755 --- a/i3-sensible-editor +++ b/i3-sensible-editor @@ -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 "$@"