aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_systemctl_service_paths.fish
diff options
context:
space:
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