aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--share/functions/__fish_systemctl_mounts.fish10
-rw-r--r--share/functions/__fish_systemctl_service_paths.fish10
-rw-r--r--share/functions/__fish_systemctl_services.fish10
-rw-r--r--share/functions/__fish_systemctl_sockets.fish10
4 files changed, 28 insertions, 12 deletions
diff --git a/share/functions/__fish_systemctl_mounts.fish b/share/functions/__fish_systemctl_mounts.fish
index 5f23bba1..b3e7dd6a 100644
--- a/share/functions/__fish_systemctl_mounts.fish
+++ b/share/functions/__fish_systemctl_mounts.fish
@@ -1,5 +1,9 @@
function __fish_systemctl_mounts
- if type -q systemctl
- systemctl list-unit-files --no-legend --type=mount ^/dev/null | cut -f 1 -d ' '
- end
+ if type -q systemctl
+ if __fish_contains_opt user
+ systemctl --user list-unit-files --no-legend --type=mount ^/dev/null | cut -f 1 -d ' '
+ else
+ systemctl list-unit-files --no-legend --type=mount ^/dev/null | cut -f 1 -d ' '
+ end
+ end
end
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
diff --git a/share/functions/__fish_systemctl_services.fish b/share/functions/__fish_systemctl_services.fish
index f48cb324..e047e6ad 100644
--- a/share/functions/__fish_systemctl_services.fish
+++ b/share/functions/__fish_systemctl_services.fish
@@ -1,5 +1,9 @@
function __fish_systemctl_services
- if type -q systemctl
- systemctl list-unit-files --no-legend --type=service ^/dev/null | cut -f 1 -d ' '
- end
+ if type -q systemctl
+ if __fish_contains_opt user
+ systemctl --user list-unit-files --no-legend --type=service ^/dev/null | cut -f 1 -d ' '
+ else
+ systemctl list-unit-files --no-legend --type=service ^/dev/null | cut -f 1 -d ' '
+ end
+ end
end
diff --git a/share/functions/__fish_systemctl_sockets.fish b/share/functions/__fish_systemctl_sockets.fish
index ecb61ea2..f17541ef 100644
--- a/share/functions/__fish_systemctl_sockets.fish
+++ b/share/functions/__fish_systemctl_sockets.fish
@@ -1,5 +1,9 @@
function __fish_systemctl_sockets
- if type -q systemctl
- systemctl list-unit-files --no-legend --type=socket ^/dev/null | cut -f 1 -d ' '
- end
+ if type -q systemctl
+ if __fish_contains_opt user
+ systemctl --user list-unit-files --no-legend --type=socket ^/dev/null | cut -f 1 -d ' '
+ else
+ systemctl list-unit-files --no-legend --type=socket ^/dev/null | cut -f 1 -d ' '
+ end
+ end
end