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
Currently, when creating a somewhat complex command structure, I need to work with "--help" to find out which subcommands/options a command supports (or look at the code obviously).
I would like to have some kind of autocomplete that makes sure I can only enter "valid" subcommands in a chainable way.
So for instance I have commandA that has commandB, where commandB has an option "-input" of type string.
Now it would be nice to use a command chaining generator like this: commandGenerator.commandA(),commandB().optionInput('someString'). which would then generate commandA commandB --input 'someString'.
To do that I would extract all possible commands, subcommands, options etc. and generate a commandChainer class. Unfortunately I haven't found a way of listing all commands in one go, I can only show the help for each command separately.
Is there any way I can do something like this?
The text was updated successfully, but these errors were encountered:
Given the root Command object for your command structure, there are properties for the subcommands and options and arguments. This would be much simpler to work with than parsing the Help output.
Currently, when creating a somewhat complex command structure, I need to work with "--help" to find out which subcommands/options a command supports (or look at the code obviously).
I would like to have some kind of autocomplete that makes sure I can only enter "valid" subcommands in a chainable way.
So for instance I have
commandA
that hascommandB
, wherecommandB
has an option "-input" of type string.Now it would be nice to use a command chaining generator like this:
commandGenerator.commandA(),commandB().optionInput('someString').
which would then generatecommandA commandB --input 'someString'
.To do that I would extract all possible commands, subcommands, options etc. and generate a commandChainer class. Unfortunately I haven't found a way of listing all commands in one go, I can only show the help for each command separately.
Is there any way I can do something like this?
The text was updated successfully, but these errors were encountered: