js-completion.yml
commands:
- name: js-completion
description: prints hello world
command: echo "hello world"
completion:
completionPath: ./completion.js
completion.js
module.exports = function () {
return ['a', 'b', 'c'];
};
nca js-completion {tab}
Prints:
a b c
Adding the flag merge: true
in the completion, merges the custom completion with the default yargs one.