Move __fish_print_debian_services into invoke-rc.d completion script

This commit is contained in:
Jason 2019-12-03 19:15:33 +09:00
parent d90a62c151
commit 3129b3c5ef
No known key found for this signature in database
GPG key ID: EC0F05857CEACA2F
2 changed files with 7 additions and 8 deletions

View file

@ -1,3 +1,10 @@
function __fish_print_debian_services --description 'Prints services installed'
for service in /etc/init.d/*
if [ -x $service ]
basename $service
end
end
end
function __fish_invoke_rcd_has_service
set tokens (commandline -opc)
@ -15,4 +22,3 @@ complete -f -c invoke-rc.d -n '__fish_invoke_rcd_has_service' -a 'restart' -d 'R
complete -f -c invoke-rc.d -n '__fish_invoke_rcd_has_service' -a 'reload' -d 'Reload Configuration'
complete -f -c invoke-rc.d -n '__fish_invoke_rcd_has_service' -a 'force-reload' -d 'Force reloading configuration'
complete -f -c invoke-rc.d -n '__fish_invoke_rcd_has_service' -a 'status' -d 'Print the status of the service'

View file

@ -1,7 +0,0 @@
function __fish_print_debian_services --description 'Prints services installed'
for service in /etc/init.d/*
if [ -x $service ]
basename $service
end
end
end