From b6be57f119f68bd8068701bfcf21e82c1664ed42 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Tue, 18 Jul 2017 06:57:53 +0200 Subject: [PATCH 1/2] [systemd] Added commands for system control These commands are user verified by systemd itself, so we don't need to `sudo` them. --- plugins/systemd/systemd.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh index 5a35ecbc7..c98ed9cf4 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -1,6 +1,8 @@ user_commands=( list-units is-active status show help list-unit-files - is-enabled list-jobs show-environment cat list-timers) + is-enabled list-jobs show-environment cat list-timers + is-system-running default rescue halt poweroff reboot + emergency kexec exit suspend hibernate hybrid-sleep) sudo_commands=( start stop reload restart try-restart isolate kill @@ -14,3 +16,4 @@ for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done alias sc-enable-now="sc-enable --now" alias sc-disable-now="sc-disable --now" alias sc-mask-now="sc-mask --now" + From 1adde8151e7530d3741fffeac4fa0184e42267b4 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 26 Oct 2017 11:51:35 +0200 Subject: [PATCH 2/2] Added new command for "apt-get autoremove" --- plugins/debian/debian.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 28131ff80..04747ffad 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -44,6 +44,7 @@ alias app='apt-cache policy' if [[ $use_sudo -eq 1 ]]; then # commands using sudo ####### alias aac='sudo $apt_pref autoclean' + alias aar='sudo apt-get --purge autoremove' #this command is only with apt-get alias abd='sudo $apt_pref build-dep' alias ac='sudo $apt_pref clean' alias ad='sudo $apt_pref update' @@ -75,6 +76,7 @@ if [[ $use_sudo -eq 1 ]]; then # commands using su ######### else alias aac='su -ls \'$apt_pref autoclean\' root' + alias aar='su -lc "apt-get --purge autoremove" root' #this command is only with apt-get abd() { cmd="su -lc '$apt_pref build-dep $@' root" print "$cmd"