Add support for just complete existant commands.

Following Marc idea I create a pull request for add rehash support, so only autocomplete works only with present commands. I believe there is no regression.