You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good if we could also pass the configuration via the ProgramOptions to yargs.
I have a concrete case for this in our project. We have options which are in camelCase e.g."--helloWorld". The yargs parser in the default configuration adds an alias "hello-world" to the args object:
Apparently this breaks the autocompletion function. Maybe there is a better way...
But I think this feature is also useful to others as well. So long story short maybe the ProgramOptions can be extended with the yargs parser config options and pass it to the yargs parser.
The text was updated successfully, but these errors were encountered:
@arbue thanks for suggesting this, it should be possible to do this with the latest release. Let me know if you encounter problems with the implementation.
The yargs package allows to configure the args parser to change the default behavior. https://github.com/yargs/yargs/blob/main/docs/advanced.md#customizing
It would be good if we could also pass the configuration via the ProgramOptions to yargs.
I have a concrete case for this in our project. We have options which are in camelCase e.g."--helloWorld". The yargs parser in the default configuration adds an alias "hello-world" to the args object:
This can be avoided with the yargs parser config
'strip-dashed': true
For now I have patched the
createYargsInstance()
method like:Apparently this breaks the autocompletion function. Maybe there is a better way...
But I think this feature is also useful to others as well. So long story short maybe the ProgramOptions can be extended with the yargs parser config options and pass it to the yargs parser.
The text was updated successfully, but these errors were encountered: