aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_systemctl_mounts.fish
diff options
context:
space:
mode:
Diffstat (limited to 'share/functions/__fish_systemctl_mounts.fish')
-rw-r--r--share/functions/__fish_systemctl_mounts.fish10
1 files changed, 7 insertions, 3 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