In our code we use commands and "subcommands", calling our tool via iobroker object will result in our code processing the command and then calling yargs.showHelp(), the generated output looks like:
iob object
Unknown command "object undefined"!
iobroker object
Object management
Commands:
iobroker get <id> Get object specified by id
...
...
...
I would expect, that it shows iobroker object get <id> and not iobroker get <id> as it is done when I call iobroker object --help:
moritz@moritz-ThinkPad-E470:~/workspaces/ioBroker.js-controller$ iob object --help
iobroker object
Object management
Commands:
iobroker object get <id> Get object specified by id
...
...
...
Why is there a difference, is this intended? If yes, how can I achieve the desired output via showHelp()?
You can find the relevant code here: https://github.com/ioBroker/ioBroker.js-controller/blob/12a235299be58d7bb4592d71d61478afe9f1797b/lib/setup.js#L34-L370
In our code we use commands and "subcommands", calling our tool via
iobroker objectwill result in our code processing the command and then callingyargs.showHelp(), the generated output looks like:I would expect, that it shows
iobroker object get <id>and notiobroker get <id>as it is done when I calliobroker object --help:Why is there a difference, is this intended? If yes, how can I achieve the desired output via
showHelp()?You can find the relevant code here: https://github.com/ioBroker/ioBroker.js-controller/blob/12a235299be58d7bb4592d71d61478afe9f1797b/lib/setup.js#L34-L370