-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested procs/dispatches #13
Comments
I think it would not be so hard to add a Personally, I have never encountered even a 2-level case as you describe. Your example even has a shared root |
thanks I'll look into |
Cool. Just in case this didn't already occur to you and obviously depending on your exact use case, you may also get some mileage out of just separating your |
One last thought - it might be possible to make dispatchMulti([ demo, help = { "verb": "on=chatty, off=quiet" } ],
[ "remote",
[ add, help = { "mirror": "do not use separate remotes } ],
[ prune, help = { "dryRun" : "only list what would be done" } ] ],
[ show, short = { "gamma": 'z' } ]) You would just need to test if the first argument is a string (or proc, but a string test is probably easier) and then do the right thing there. |
This is a pretty needed feature, for example:
|
As mentioned above, I am open to reviewing a PR for a |
I understand, I'll try to pick it up on my free time, as a work around I was trying to dispatch manually e.g: proc containers(args:seq[string]=@[ ] ):
let subcommand = args[0]
if subcommand == "list":
listContainers(args[1..^1]) but that didn't work because of options validation, any idea how to get around that? |
|
Github really is too hair-trigger about auto-closing issues. |
So, just an update for @xmonader & @davidnorthetal . Things are pretty close to being workable. There is now a What I am hoping to do is get something like Had this approach occurred to me earlier I would have suggested one of you two look into that. (There may be a little more work to get |
Ok. Latest commit of It would be nice to be more automatic, but it's way better than Current weirdnesses - the |
I even got |
I am going to go ahead and close this issue. I'm sure it's not 100% how it should be, but any follow-on issues should be much more specific than the general feature which works now. |
As title states, don't think it's possible yet.
Something like:
Yay/Nay? - Can you give an inkling how much work this would be?
Thanks for your input.
The text was updated successfully, but these errors were encountered: