mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-18 12:33:38 +08:00
10 lines
348 B
Fish
10 lines
348 B
Fish
function __fish_print_service_names -d 'All services known to the system'
|
|
if test -d /run/systemd/system
|
|
command systemctl list-units -t service | cut -d ' ' -f 1 | grep '\.service$' | sed -e 's/\.service$//'
|
|
else if type -f rc-service 2> /dev/null
|
|
command rc-service -l
|
|
else
|
|
command ls /etc/init.d
|
|
end
|
|
end
|