I believe pan64 is correct , but thought I would just raise a point about terminology based on the original question.
You have said:
autocomplete of bash is not working for some commands
Now my understanding is that 'autocompletion' is when you type in a portion of the command you wish and then by pressing the tab key twice in quick succession you are either presented
with the exact command or a list of commands if there is more than one.
So on my machine:
if ifcfg ifnames ifrename ifstat
However, if you type in the command and press enter, then your PATH is searched to find the command you are looking for and an error returned if not found or the output of the command if it is found.
This second version would be what you were referring to ... I believe