diff options
Diffstat (limited to 'share/functions/__fish_print_service_names.fish')
-rw-r--r-- | share/functions/__fish_print_service_names.fish | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/functions/__fish_print_service_names.fish b/share/functions/__fish_print_service_names.fish new file mode 100644 index 00000000..8b2926ed --- /dev/null +++ b/share/functions/__fish_print_service_names.fish @@ -0,0 +1,9 @@ +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 |