From 900faf00307d1d29d147d761f748b59a23806cd4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 12 May 2020 23:36:55 +1200 Subject: Move systemd editor setting to after visual Loaded out of order otherwise, so doesn't get set. --- sh/profile.d/systemd.sh | 4 ---- sh/profile.d/visual.sh | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 sh/profile.d/systemd.sh (limited to 'sh/profile.d') diff --git a/sh/profile.d/systemd.sh b/sh/profile.d/systemd.sh deleted file mode 100644 index a6e1b707..00000000 --- a/sh/profile.d/systemd.sh +++ /dev/null @@ -1,4 +0,0 @@ -# If systemctl is installed, use $VISUAL as its editor, not $EDITOR -command -v systemctl >/dev/null 2>&1 || return -SYSTEMD_EDITOR=$VISUAL -export SYSTEMD_EDITOR diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index 19c8f490..eb3c1143 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -6,3 +6,9 @@ else VISUAL='vi' fi export VISUAL + +# If systemctl is installed, use $VISUAL as its editor, not $EDITOR +if command -v systemctl >/dev/null 2>&1 ; then + SYSTEMD_EDITOR=$VISUAL + export SYSTEMD_EDITOR +fi -- cgit v1.2.3