The Commander.js adapter overrides program.parse() to intercept complete --
requests, but does not override program.parseAsync(). When using async action
handlers (which require parseAsync()), the completion protocol is never
intercepted
Reproduction
import { Command } from 'commander'
import tab from '@bomb.sh/tab/commander'
const program = new Command('my-cli')
program
.command('greet')
.description('Say hello')
.action(async (name) => { // async handler requires parseAsync()
console.log(`Hello, ${name}!`)
})
const completion = tab(program)
// This works (adapter intercepts):
// program.parse()
// This does NOT work (adapter doesn't intercept):
await program.parseAsync()
The Commander.js adapter overrides
program.parse()to interceptcomplete --requests, but does not override
program.parseAsync(). When using async actionhandlers (which require
parseAsync()), the completion protocol is neverintercepted
Reproduction