How to Enable it
I believe every developers needs to work productively when using npm by enable the tab-completion so that we can use the npm without too much typing to complete the commands we want to use . Here are the command I used to enable the npm completion on my Ubuntu box:
npm completion >> ~/.bashrc
The above command will write some shell scripts into my .bashrc file.