]> Sergey Matveev's repositories - nnn.git/commitdiff
nuke plugin: use $VISUAL environment variable
authortchici <tchici884@gmail.com>
Sun, 22 Nov 2020 15:54:02 +0000 (15:54 +0000)
committertchici <tchici884@gmail.com>
Sun, 22 Nov 2020 15:54:02 +0000 (15:54 +0000)
falls back to previous behavior if $VISUAL is not set ($EDITOR then vi)

plugins/nuke

index b7836330ed8533e2df2c127f1278c794e66b763b..587db6986c347d8e2da4acf4149e1c1d61845021 100755 (executable)
@@ -76,7 +76,7 @@ IMAGE_CACHE_PATH="$(dirname "$1")"/.thumbs
 
 FPATH="$1"
 FNAME=$(basename "$1")
-EDITOR="${EDITOR:-vi}"
+EDITOR="${VISUAL:-${EDITOR:-vi}}"
 PAGER="${PAGER:-less -R}"
 ext="${FNAME##*.}"
 if [ -n "$ext" ]; then