800af047d7e5b2980c72bb5a444c1edeafc026e4

Author
Juraj Fiala <doctorjellyface@riseup.net>
Committer
Juraj Fiala <doctorjellyface@riseup.net>
Date

Message

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.

Diff

1diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh
2index 7d3db0f8e3bac444e6a31f24295e32f7fb317b0a..503f7c1381f0686ef31e9675139da1e7cf072c46 100644
3--- a/plugins/systemd/systemd.plugin.zsh
4+++ b/plugins/systemd/systemd.plugin.zsh
5@@ -9,3 +9,4 @@ sudo_commands=(
6 
7 for c in $user_commands; do; alias sc-$c="systemctl $c"; done
8 for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
9+alias sc-launch="sudo systemctl start $c && sudo systemctl enable $c"