List available npm scripts and support tab completion

InstructorElijah Manor

Share this video with your friends

Send Tweet

In this lesson we will look at different ways you can list the available npm scripts. Whether we want to pipe npm run through less or install an npm package such as completion or ntl, we have many options to quickly execute scripts with shell tab completion.

Daniel
Daniel
~ 7 years ago

Hmm on MacOS, with npm's autocompletion script appended to .bash_profile or /usr/local/etc/bash_completion.d/npm, npm run then pressing tab does not list the scripts out like it does in the video. I can double tab and it will list them all out but I can't tab through them. It's also super slow at around a second.

Maybe this just doesn't function well in MacOS or is there a bash config that enables this behaviour?

Anyway ntl looks like a much better solution for now.