When running `systemctl` commands that require sudo, the users'
configured editor environment variables were not preserved. This
resulted in systemctl opening a default editor.
By instructing sudo to preserve the common environment variables for
configuring an editor, systemctl can see these variables and open the
users' preferred editor.
This is mostly relevant for the `sc-edit` alias.
`restart` is a unit-related command, not power-related, so it should appear as `sc-restart=sudo systemctl restart` and `scu-restart=systemctl --user restart`
* Order systemctl commands alphabetically
Simplifying the plugin maintenance.
Signed-off-by: Petr Šabata <contyk@redhat.com>
* Include the latest systemctl commands
Based on systemd-233. I'm still keeping the old, now unsupported
commands for backwards compatibility as well.
Signed-off-by: Petr Šabata <contyk@redhat.com>
* Add daemon-reload (#3701)
Closes#3701
Co-authored-by: Javier Tia <javier.tia@gmail.com>