Closed jolly-fellow closed 1 year ago
It was agreed with @larryk85 to have the only set of the options for commands described in 2. I will update declaration of these options and check if they work correctly. It fix the bug #123
The described problems were partially solved in the fix of #123 . I have made a small research about solving of the parser problems by rewriting it with subparsers and found that this approach doesn't help to solve the problems. Read the results of the research here: https://github.com/AntelopeIO/DUNE/wiki/Result-of-small-research-about-the-DUNE-CLI-parser
Therefore this proposal will not work and should be closed.
Closed because of the proposed approach doesn't solve the described problems.
The CLI parser, as it implemented now, has following problems:
--create-account
,--system-newaccount
,--bootstrap-system-full
,--send-action
,--get-table
. We should clarify this issue, and if the option takes one set of arguments it could be declared correctly, if the option takes multiple sets of arguments it make sense to take these sets fromstdin
or a file instead of super long command line which is practically impossible to edit manually.global arguments are those which accepted with any command like
--debug
,--help
and so on. For each command will be created a dedicated subparser object, command line syntax will be much easier because it will be limited by one command and it allows to have command specific arguments with the same names but different behavior depending on the command.Thus for the beginning I propose to start from clarification of chapter 2. It allows to fix a bug #123 and then discuss about solving of other problems at proper time.