Skip to content

Commit

Permalink
feat(cli): support completion rules
Browse files Browse the repository at this point in the history
via asynchronous promise
  • Loading branch information
jrappen committed Mar 18, 2017
1 parent 880eb03 commit fb31bd5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/docsify
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ var argv = require('yargs')
}),
handler: (argv) => run.serve(argv.path, argv.open, argv.port)
})
.completion('completion', function (current, argv, done) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve(['init', 'serve'])
}, 10)
})
})
.help()
.option('help', {
alias: 'h',
Expand Down

0 comments on commit fb31bd5

Please sign in to comment.