Tab/Auto Completion for Commander.js CLIs
npm install commander-tabtab
|3||downloads in the last week|
|16||downloads in the last month|
|Version||0.1.0 last updated 6 months ago|
|Keywords||tab, tabtab, commander, commander.js, completion, auto, CLI|
Tab/Auto Completion for Commander.js CLIs.
Look at the code of the Example App @ /examples/exampleapp
If installed properly and you entered
exampleapp and striked tab you would get…
# exampleapp hello helllllooooooo world
Then if you were to enter
exampleapp he and striked tab you would get…
# exampleapp hello hello helllllooooooo
Or if you were to enter
exampleapp w and striked tab you would get…
# exampleapp world
- Require taptap-commander.
commanderTabTab = require('taptap-commander');
- Just before
commanderTabTab.init(program, 'NAME OF YOUR BIN/CLI FILE/APP');
- Install your app using NPM
npm install -g .(This adds your app to your shell's PATH)
If you would like to install completion everywhere rather than just in the current shell enter this line.
- Add completion helper to ~/.bashrc (or ~/.zshrc)
APPNAME completion >> ~/.bashrc
else if you just want to try out with it enabled in the current shell enter this line.
- Add completion to current shell
source <(pkgname completion)
In The Wild
npunch - NodeJS WebApp Development Hostbox Thing.