From: Michael Stapelberg Date: Sat, 19 Nov 2011 14:10:39 +0000 (+0000) Subject: Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager} X-Git-Tag: 4.2~240 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ee43861fc412d37585f43ea085d4c498376d0fdf;p=i3%2Fi3 Also check for empty $PAGER/$VISUAL/$EDITOR in i3-sensible-{editor,pager} --- 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 "$@" diff --git a/i3-sensible-pager b/i3-sensible-pager index 5af8d6b4..32f30aff 100755 --- a/i3-sensible-pager +++ b/i3-sensible-pager @@ -4,7 +4,7 @@ # # Distributions/packagers can enhance this script with a # distribution-specific mechanism to find the preferred pager. -which $PAGER >/dev/null && exec $PAGER "$@" +[ -n "$PAGER" ] && which $PAGER >/dev/null && exec $PAGER "$@" # Hopefully one of these is installed: which most >/dev/null && exec most "$@"