diff options
-rw-r--r-- | man/systemctl.xml | 1 | ||||
-rw-r--r-- | src/systemctl/systemctl.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml index 35f47de52c..409b6f0895 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1733,6 +1733,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service <varname>$VISUAL</varname> are present or if it is set to an empty string or if their execution failed, systemctl will try to execute well known editors in this order: + <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>. diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index a7b8e54a9c..b3d90d2c33 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5879,7 +5879,7 @@ static int run_editor(char **paths) { execvp(editor, (char* const*) args); } - FOREACH_STRING(p, "nano", "vim", "vi") { + FOREACH_STRING(p, "editor", "nano", "vim", "vi") { args[0] = p; execvp(p, (char* const*) args); /* We do not fail if the editor doesn't exist |