aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/visual.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-12 23:36:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-12 23:56:20 +1200
commit900faf00307d1d29d147d761f748b59a23806cd4 (patch)
treea3d28bb33c579a1ccc4a9156bdd5cbc2c9c3a7c0 /sh/profile.d/visual.sh
parent08c768e5110b1acc3bbdc4da365e7e59cb50f510 (diff)
downloaddotfiles-900faf00307d1d29d147d761f748b59a23806cd4.tar.gz
dotfiles-900faf00307d1d29d147d761f748b59a23806cd4.zip
Move systemd editor setting to after visual
Loaded out of order otherwise, so doesn't get set.
Diffstat (limited to 'sh/profile.d/visual.sh')
-rw-r--r--sh/profile.d/visual.sh6
1 files changed, 6 insertions, 0 deletions
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