aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-04-27 21:03:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-04-27 21:03:47 +1200
commite33f5665af536769b154ebcbbfae3b5bd2f7fff4 (patch)
tree230d00f96db8ccb968a05f23a2c73277deaa0d41
parentFix a few spelling and punctuation errors (diff)
downloaddotfiles-e33f5665af536769b154ebcbbfae3b5bd2f7fff4.tar.gz
dotfiles-e33f5665af536769b154ebcbbfae3b5bd2f7fff4.zip
Set systemctl editor to vi rather than ed
-rw-r--r--sh/profile.d/systemd.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/profile.d/systemd.sh b/sh/profile.d/systemd.sh
new file mode 100644
index 00000000..3c8bf04c
--- /dev/null
+++ b/sh/profile.d/systemd.sh
@@ -0,0 +1,4 @@
+# If systemctl is installed, use $VISUAL as its editor, not $EDITOR
+command -v systemctl >/dev/null 2>&1 || exit
+SYSTEMD_EDITOR=$VISUAL
+export SYSTEMD_EDITOR