/usr/share/fish/completions/rc-service.fish is in fish-common 2.2.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # First argument is the names of the service, i.e. a file in /etc/init.d
complete -c rc-service -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
-xa "(__fish_print_service_names)" --description "Service name"
# The second argument is what action to take with the service
complete -c rc-service -n "test (__fish_number_of_cmd_args_wo_opts) -gt 1" \
-xa "(__fish_complete_service_actions)"
# Complete rc-service the options
complete -c rc-service -s e -l exists -d 'Tests if the service exists or not'
complete -c rc-service -s i -l ifexists \
-d 'If the service exists, then run the command'
complete -c rc-service -s l -l list -d 'List all available services'
complete -c rc-service -s r -l resolve \
-d 'Resolve the service name to an init script'
complete -c rc-service -s h -l help -d 'Display the help output'
complete -c rc-service -s C -l nocolor -d 'Disable color output'
complete -c rc-service -s V -l version -d 'Display software version'
complete -c rc-service -s v -l verbose -d 'Run verbosely'
complete -c rc-service -s q -l quiet -d 'Run quietly (Does not affect errors)'
|