mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
systemctl completions: Support user-mode
This commit is contained in:
parent
388a8d09d8
commit
3e32715693
4 changed files with 28 additions and 12 deletions
|
@ -1,5 +1,9 @@
|
||||||
function __fish_systemctl_mounts
|
function __fish_systemctl_mounts
|
||||||
if type -q systemctl
|
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 ' '
|
systemctl list-unit-files --no-legend --type=mount ^/dev/null | cut -f 1 -d ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
function __fish_systemctl_service_paths
|
function __fish_systemctl_service_paths
|
||||||
if type -q systemctl
|
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 ' '
|
systemctl list-unit-files --no-legend --type=path ^/dev/null | cut -f 1 -d ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
function __fish_systemctl_services
|
function __fish_systemctl_services
|
||||||
if type -q systemctl
|
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 ' '
|
systemctl list-unit-files --no-legend --type=service ^/dev/null | cut -f 1 -d ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
function __fish_systemctl_sockets
|
function __fish_systemctl_sockets
|
||||||
if type -q systemctl
|
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 ' '
|
systemctl list-unit-files --no-legend --type=socket ^/dev/null | cut -f 1 -d ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue