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 "$@"