From: Jakub Kaczor Date: Fri, 30 Sep 2022 10:06:20 +0000 (+0000) Subject: Make vimdot work with $EDITOR that is not a full path X-Git-Tag: 6.0.2~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c364a58c2df0838f1bdf2874d2bb141917b5038;p=graphviz Make vimdot work with $EDITOR that is not a full path --- diff --git a/plugin/xlib/vimdot.sh b/plugin/xlib/vimdot.sh index 1ca125954..55fc476d5 100755 --- a/plugin/xlib/vimdot.sh +++ b/plugin/xlib/vimdot.sh @@ -9,8 +9,7 @@ fi error() { echo "$0: $*" >&2; exit 1; } # Try $EDITOR first, else try vim or vi -editor="$EDITOR" -[ -x "$editor" ] || editor="/usr/bin/vim" +editor="$(which $EDITOR)" || editor="/usr/bin/vim" [ -x "$editor" ] || editor="/usr/bin/vi" [ -x "$editor" ] || error "EDITOR not found or not executable";