How to make a REPL with defined command/subcommands? #460
-
I really like what I see with commanddotnet! This is, by far the best framework for .Net I’ve used. Keep up the awesome work! I’m coming from using Python and Cmd2, which allows an interactive Repl with the commands defined. I.e. you can run a command, ask for help, or whatever without exiting back to the command-line (unless or until you quit). Now I need to do something similar on Windows, but in C#. Just not quite sure how to do this, as it doesn’t seem to be a usual use-case. I have the commands defined and they work great, but I would like to just loop to wait on the next command instead of exiting the app. I’m hoping there is an easy way to do this! Any help or nudges would be appreciated! Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @legacy-code, thanks for the compliments. This is something we have a poc for, but I've since had a child and this feature has fallen in priority for me. I think all that remains are tests, but the tests for this are more complicated. Having said that, I did publish a package for it that some of used successfully. The PR is at #402. That PR description and the example are the only docs for it. You can let me know if you have questions. Also, if you want to write some tests, I'd be happy to except PRs to get this pushed into main branch. Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @legacy-code, thanks for the compliments.
This is something we have a poc for, but I've since had a child and this feature has fallen in priority for me. I think all that remains are tests, but the tests for this are more complicated.
Having said that, I did publish a package for it that some of used successfully.
The PR is at #402. That PR description and the example are the only docs for it. You can let me know if you have questions.
Also, if you want to write some tests, I'd be happy to except PRs to get this pushed into main branch.
Cheers,
Drew