From 9f3fbd93ce4a326ed6b08f84f5301e7d588444cd Mon Sep 17 00:00:00 2001 From: tchici Date: Sun, 22 Nov 2020 16:18:06 +0000 Subject: [PATCH] use $VISUAL environment variable for plugins falls back to previous behavior if $VISUAL is not set ($EDITOR then vi) --- plugins/.nmv | 2 +- plugins/bulknew | 2 +- plugins/dups | 2 +- plugins/suedit | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/.nmv b/plugins/.nmv index 77625466..3007f7ec 100755 --- a/plugins/.nmv +++ b/plugins/.nmv @@ -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}" diff --git a/plugins/bulknew b/plugins/bulknew index 4010662d..9aed5919 100755 --- a/plugins/bulknew +++ b/plugins/bulknew @@ -9,7 +9,7 @@ # Shell: POSIX compliant # Author: KlzXS -EDITOR="${EDITOR:-vi}" +EDITOR="${VISUAL:-${EDITOR:-vi}}" TMPDIR="${TMPDIR:-/tmp}" printf "'f'ile / 'd'ir? " diff --git a/plugins/dups b/plugins/dups index 98e8f727..eaabcb5f 100755 --- a/plugins/dups +++ b/plugins/dups @@ -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 diff --git a/plugins/suedit b/plugins/suedit index 7598525b..9fb81fa3 100755 --- a/plugins/suedit +++ b/plugins/suedit @@ -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