tab completion for service command on debian

Posted by markus on Server Fault See other posts from Server Fault or by markus
Published on 2012-06-28T14:25:32Z Indexed on 2012/09/07 9:40 UTC
Read the original article Hit count: 125

Filed under:
|
|

I have two systems with debian squeeze installed. On one system when I type:

service <TAB> 

it shows me all available service (from /etc/init.d)

on the other system it shows me all files from the current directory. Does anyone know which setting changes that behaviour ?

UPDATE:

The file /etc/bash_completion.d/service was missing. I copied it from the machine where it is working. If I type complete -p | grep service it shows me:

complete -F _service service

On the machine where it is not working that command shows me nothing. I executed complete -F _service service in the command line, after that, the command service <TAB> shows me:

service -su: completion: function `_service' not found

this function is defined in the service file I recently copied, for some reasons it can't be found ...

© Server Fault or respective owner

Related posts about debian

Related posts about bash