diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2011-11-19 14:10:39 +0000 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2011-11-19 14:10:39 +0000 |
commit | ee43861fc412d37585f43ea085d4c498376d0fdf (patch) | |
tree | a5f5b05f5367c0f2792a58ee1f1d57a1bb7f3932 /i3-sensible-editor | |
parent | 0ffcc00b1515fd109dbb95a750d7ada68679b04b (diff) | |
download | i3-ee43861fc412d37585f43ea085d4c498376d0fdf.tar.gz i3-ee43861fc412d37585f43ea085d4c498376d0fdf.zip |
Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager}
Diffstat (limited to 'i3-sensible-editor')
-rwxr-xr-x | i3-sensible-editor | 4 |
1 files changed, 2 insertions, 2 deletions
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 "$@" |