fish-shell/share/functions/__fish_systemctl_service_paths.fish
David Adam 00e0ed64bc __fish_systemctl_*: use systemctl to generate the list of units
Closes #1804.

Note that if systemd is not running, the completion will fail.
2014-11-10 12:51:07 +08:00

5 lines
164 B
Fish

function __fish_systemctl_service_paths
if type -q systemctl
systemctl list-unit-files --no-legend --type=path ^/dev/null | cut -f 1 -d ' '
end
end