Tab-completion for service script

When administering a GUI-less server installation and wanting to restart services I often use something like this to restart Apache:

service apache2 restart

That works, but I need to make sure that I type apache2 correct every time and … I don’t. I would love to have tab-completion for the service script but it seems that I don’t.

Any help would be greatly appreciated. Thanks!

Precede the command with ‘rc’
Try:
rcapa(TAB) status

Hi boblmartens,

[QUOTE=boblmartens;17544]When administering a GUI-less server installation and wanting to restart services I often use something like this to restart Apache:

service apache2 restart

That works, but I need to make sure that I type apache2 correct every time and … I don’t. I would love to have tab-completion for the service script but it seems that I don’t.

Any help would be greatly appreciated. Thanks![/QUOTE]

typically, those “services” are start scripts in /etc/init.d - and they ought to have a symlink to “rcsomething”. So as root, type “rcapa restart”, which ought to be expanded to “rcapache2 restart” and is the typical call to restart Apache’s httpd on SLES.

Regards,
Jens

[QUOTE=jmozdzen;17547]Hi boblmartens,

typically, those “services” are start scripts in /etc/init.d - and they ought to have a symlink to “rcsomething”. So as root, type “rcapa restart”, which ought to be expanded to “rcapache2 restart” and is the typical call to restart Apache’s httpd on SLES.

Regards,
Jens[/QUOTE]

[QUOTE=jesse_johnston;17546]Precede the command with ‘rc’
Try:
rcapa(TAB) status[/QUOTE]

Thanks to both of you for pointing that out. You both have just made my week!