diff --git a/share/functions/__fish_print_service_names.fish b/share/functions/__fish_print_service_names.fish index 3eeb00155..45d653a76 100644 --- a/share/functions/__fish_print_service_names.fish +++ b/share/functions/__fish_print_service_names.fish @@ -1,5 +1,5 @@ function __fish_print_service_names -d 'All services known to the system' - if type -f systemctl >/dev/null + 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 command rc-service -l @@ -7,4 +7,3 @@ function __fish_print_service_names -d 'All services known to the system' command ls /etc/init.d end end -