ohmyzsh/plugins/systemd/systemd.plugin.zsh
Juraj Fiala 800af047d7 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.
2015-08-01 17:45:00 +02:00

13 lines
495 B
Bash

user_commands=(
list-units is-active status show help list-unit-files
is-enabled list-jobs show-environment)
sudo_commands=(
start stop reload restart try-restart isolate kill
reset-failed enable disable reenable preset mask unmask
link load cancel set-environment unset-environment)
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"