-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi there, and thanks for the great work!
I'm in a situation where I want to add a description for my arguments, but not for my command.
Currently (using v6.2.1), adding both descriptions is possible with :
program
.name('my-program')
.arguments('<my-arg>')
.description('my program desc', {
'my-arg': 'my arg desc'
})
// -> help is displaying all descriptions correctly ✅ However, if I try to omit the command description, while keeping the arguments description, it doesn't work.
program
.name('my-program')
.arguments('<my-arg>')
.description(undefined, { // or null or ''
'my-arg': 'my arg desc'
})
// -> help is not displaying any description ❌ A workaround is to do :
program
.name('my-program')
.arguments('<my-arg>')
.description('\x1B[2A', { // hack to skip command desc
'my-arg': 'my arg desc'
})
// -> help is not displaying command desc (kind of)
// and displaying args desc ✅ (well, it's a hack...)
// tested on macOS, and should also work on Unix-like OSesIt would be nice to have a proper way to do this ;)
Metadata
Metadata
Assignees
Labels
No labels