mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
systemctl completions: Support user-mode
This commit is contained in:
committed by
ridiculousfish
parent
388a8d09d8
commit
3e32715693
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user