-
Hi, I have multiple sub-commands, and they have the same command name. Snippet: dispatchMultiGen(["foo"], [add])
dispatchMultiGen(["bar"], [add])
dispatchMulti([foo], [bar]) Which leads to the error: How would I go about having sub-commands with an identical name underneath them? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
We may also need to have the generated dispatcher name key off of the subcommand name. If your |
Beta Was this translation helpful? Give feedback.
-
Yeah. I thought that might be the motivation. One of the original pushers for sub-sub/sub-sub-sub command type stuff was @xmonader who was trying to replicate Docker which I personally find very overboard along these lines. { And as much as Go has much mind share over Nim, I don't think some CLI toolkit for it or Docker's popularity exactly constitutes some new standard in multi-level sub-sub-sub-cmd type CLIs. } So, replicating existing is still a pretty special edge case, perhaps being ok as manual as it is, but I am open-minded. I introduced that whole You may also be able to lessen repetition via some kind of |
Beta Was this translation helpful? Give feedback.
Yeah. I thought that might be the motivation. One of the original pushers for sub-sub/sub-sub-sub command type stuff was @xmonader who was trying to replicate Docker which I personally find very overboard along these lines. { And as much as Go has much mind share over Nim, I don't think some CLI toolkit for it or Docker's popularity exactly constitutes some new standard in multi-level sub-sub-sub-cmd type CLIs. }
So, replicating existing is still a pretty special edge case, perhaps being ok as manual as it is, but I am open-minded. I introduced that whole
parseOnly
/setByParse
stuff for other such edge cases, but using it remains pretty manual. It's not always easy to automate every thing.Y…