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

plugins/.nmv
plugins/bulknew
plugins/dups
plugins/suedit

index 77625466996568126ab9bc3c7d80de9c943c0fb2..3007f7ec8f9326ab49776ee6012d4c4f1c9698e7 100755 (executable)
@@ -16,7 +16,7 @@
 # Shell: bash
 # Author: KlzXS
 
-EDITOR="${EDITOR:-vi}"
+EDITOR="${VISUAL:-${EDITOR:-vi}}"
 TMPDIR="${TMPDIR:-/tmp}"
 INCLUDE_HIDDEN="${INCLUDE_HIDDEN:-0}"
 VERBOSE="${VERBOSE:-0}"
index 4010662d0997a19c5ec7d0ab42a4c9bef2db7a22..9aed59199588b3247c3bd0a9fa60400b0743a634 100755 (executable)
@@ -9,7 +9,7 @@
 # Shell: POSIX compliant
 # Author: KlzXS
 
-EDITOR="${EDITOR:-vi}"
+EDITOR="${VISUAL:-${EDITOR:-vi}}"
 TMPDIR="${TMPDIR:-/tmp}"
 
 printf "'f'ile / 'd'ir? "
index 98e8f72751e0213f3d98a77d6f77619d6ac910b9..eaabcb5f6e7c8c15f4ee29848113b0038d60f391 100755 (executable)
@@ -14,7 +14,7 @@
 # If the size of a file has more that $size_digits digits the file will be misplaced
 # 12 digits fit files up to 931GiB
 
-EDITOR="${EDITOR:-vi}"
+EDITOR="${VISUAL:-${EDITOR:-vi}}"
 TMPDIR="${TMPDIR:-/tmp}"
 
 size_digits=12
index 7598525b361f9e9fc23772cd6827ad33bbfb37ec..9fb81fa3de72660987a0956aebaa592b9afc4014 100755 (executable)
@@ -5,7 +5,7 @@
 # Shell: POSIX compliant
 # Author: Anna Arad
 
-EDITOR="${EDITOR:-vim}"
+EDITOR="${VISUAL:-${EDITOR:-vi}}"
 
 is_cmd_exists () {
     which "$1" > /dev/null 2>&1