cmd2: simplified main
Attention @maybebtc @mappum I cleaned up + simplified the main flow. Now, all printing is contained inside main itself! (:cheer:). I do this with the help of a cmdInvocation struct that has both a Parse and Run. The only major clunkiness left is that the "CallCommand" is still its own function. But *shrug*. Please test it works as we would expect. i changed much of the flow, so likely that i missed a complicated edge case. main roadmap: - parse the commandline to get a cmdInvocation - if user requests, help, print it and exit. - run the command invocation - output the response - if anything fails, print error, maybe with help
Showing
Please register or sign in to comment