Closed mikicz closed 6 years ago
This is hack-ish, I don't like the API. But having a different API would be backwards incompatible :( In reality, we should do #39 properly instead. However #39 is stalled for more than a half of year, so I'm probably OK with this. Please add a test tough and update the docstring, which currently lies a bit I guess (I mean before this PR anyway).
I updated the docstring and added a test, that tests adding a custom command if invoke_cli
is set to False
. Is it enough? I'm not sure how to test it more thoroughly...
I get that this isn't the ideal solution, however, I took a look at #39 and the problem is still there, the Elsa.cli
method invokes the cli and doesn't enable to "subclass" the cli anyway.
Thanks.
I want to add a command to naucse, however, elsa invokes the cli right away and I couldn't way a way to "subclass" the cli other than this one.
The following is an example from naucse, when this function is called, all three commands from elsa and the
new_command
are available from command line.