I've made a startup script, (i.e. myserviced) and put it in /etc/init.d/
I ran
chkconfig --add myserviced
I can start/stop/restart the service just find using:
service myserviced start
etc. However, I notice that when I type "service" and then do TAB (to get a list of possible completions), I don't see myserviced in the list of possible completions (it lists all the other services). How do I add myserviced to the auto-completion list?
This is in zsh on RHEL.
Thanks
you can use the following command to add all listed scripts in /etc/init.d/
to the service command:
complete -W "$(ls /etc/init.d/)" service
-W
will create word list from the ($)specified path which 'service' will use for auto-complete.