From 800af047d7e5b2980c72bb5a444c1edeafc026e4 Mon Sep 17 00:00:00 2001 From: Juraj Fiala Date: Sat, 1 Aug 2015 17:45:00 +0200 Subject: [PATCH 1/2] Add sc-launch as a shortcut for start & enable I've heard many people requesting systemd to add this functionality. It's very handy under Arch. --- plugins/systemd/systemd.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh index 7d3db0f8e..503f7c138 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -9,3 +9,4 @@ sudo_commands=( for c in $user_commands; do; alias sc-$c="systemctl $c"; done for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done +alias sc-launch="sudo systemctl start $c && sudo systemctl enable $c" From 86d881c47de3d0ed791e1e7d8c2ed480e6c781ee Mon Sep 17 00:00:00 2001 From: Juraj Fiala Date: Sun, 6 Sep 2015 13:01:09 +0200 Subject: [PATCH 2/2] Added aliases for --now commands Also removed the old sc-launch alias because this is just better. --- 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 503f7c138..f9b522e40 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -9,4 +9,7 @@ sudo_commands=( for c in $user_commands; do; alias sc-$c="systemctl $c"; done for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done -alias sc-launch="sudo systemctl start $c && sudo systemctl enable $c" + +alias sc-enable-now="sc-enable --now" +alias sc-disable-now="sc-disable --now" +alias sc-mask-now="sc-mask --now"