How to set Auto Complete “service” command on Redhat

I have been using SuSE Linux for some time and I love SuSE Linux service script that activated with a symbolic link. In order to start a SSH service, I can easily issue a command “rcsshd start”.

For Redhat or Centos Linux, you’re require to type command such as “service sshd start” and the main problem is NO auto complete for service command by default. Yes I admitted I’m lazy guy!

So how to set AUTO COMPLETE “service” command on Redhat/Centos?

Type:
complete -W "$(ls /etc/init.d/)" service
Read more

Possibly Related Posts:


Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com