From 98e04184167d16e43733706ba87f13d96bd9f7b7 Mon Sep 17 00:00:00 2001 From: Igor Avdeev Date: Fri, 16 Oct 2015 12:14:11 +0300 Subject: [PATCH] Add sc-user-* aliases for systemd --user flag --- plugins/systemd/systemd.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh index b1979355..73c52436 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -2,6 +2,10 @@ user_commands=( list-units is-active status show help list-unit-files is-enabled list-jobs show-environment cat) +dash_user_commands=( + start stop status enable disable edit + ) + sudo_commands=( start stop reload restart try-restart isolate kill reset-failed enable disable reenable preset mask unmask @@ -9,6 +13,7 @@ sudo_commands=( edit) for c in $user_commands; do; alias sc-$c="systemctl $c"; done +for c in $dash_user_commands; do; alias sc-user-$c="systemctl --user $c"; done for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done alias sc-enable-now="sc-enable --now"