Skip to content

Commit fb31bd5

Browse files
committed
feat(cli): support completion rules
via asynchronous promise
1 parent 880eb03 commit fb31bd5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/docsify

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ var argv = require('yargs')
6868
}),
6969
handler: (argv) => run.serve(argv.path, argv.open, argv.port)
7070
})
71+
.completion('completion', function (current, argv, done) {
72+
return new Promise(function (resolve, reject) {
73+
setTimeout(function () {
74+
resolve(['init', 'serve'])
75+
}, 10)
76+
})
77+
})
7178
.help()
7279
.option('help', {
7380
alias: 'h',

0 commit comments

Comments
 (0)