MacOS – autocomplete in zsh after `npm run tdd` command

macosterminalzsh

I'm using OS X 10.10.3, I have installed zsh. And every time when I want to run a specific test I configured in package.json to execute npm run tdd followed by the test file.

In linux systems if I press tab after this command:

npm run tdd ~/

will show me the folders or will attempt to autocomplete the instruction, however this doesn't happen in zsh on OS X, it just makes the noise like there are no recommendations for this.

How can this be fixed?

Best Answer

Add the following to your .zshrc:

autoload -Uz compinit
compinit

that should get you going. Now, read

man zshcompsys