aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_systemctl_service_paths.fish
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-02-19 14:22:21 +0100
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-03-06 23:05:24 -0800
commit3e32715693878548f2cf51206e33ebf6f0dda47b (patch)
tree7eb4ba64650b6b55a4e050c0431ec465f213ae4e /share/functions/__fish_systemctl_service_paths.fish
parent388a8d09d80b8b7d1b6e63225d9deafc6d4f4660 (diff)
systemctl completions: Support user-mode
Diffstat (limited to 'share/functions/__fish_systemctl_service_paths.fish')
-rw-r--r--share/functions/__fish_systemctl_service_paths.fish10
1 files changed, 7 insertions, 3 deletions
diff --git a/share/functions/__fish_systemctl_service_paths.fish b/share/functions/__fish_systemctl_service_paths.fish
index 2f79ec10..4c5d5ab5 100644
--- a/share/functions/__fish_systemctl_service_paths.fish
+++ b/share/functions/__fish_systemctl_service_paths.fish
@@ -1,5 +1,9 @@
function __fish_systemctl_service_paths
- if type -q systemctl
- systemctl list-unit-files --no-legend --type=path ^/dev/null | cut -f 1 -d ' '
- end
+ if type -q systemctl
+ if __fish_contains_opt user
+ systemctl --user list-unit-files --no-legend --type=path ^/dev/null | cut -f 1 -d ' '
+ else
+ systemctl list-unit-files --no-legend --type=path ^/dev/null | cut -f 1 -d ' '
+ end
+ end
end