athena-framework / athena

An ecosystem of reusable, independent components
https://athenaframework.org
MIT License
211 stars 17 forks source link

Console - reclaim reserved commands, like "list" and "-v" #298

Closed paulocoghi closed 1 year ago

paulocoghi commented 1 year ago

Is it possible to use the "list" command for my own purposes, overwriting its original usage?

Also, I would like to use the lowercase "-v" for version, instead of the original "verbose".

Are those changes possible? There is no problem if it isn't.

Blacksmoke16 commented 1 year ago

Possibly. You could try extending the ACON::Application type, then:

I'm not sure if there will be any other side effects, but seems like it should be fine. Up to you if you think it's worth the extra overhead. Another approach could just be to not do this but simply do https://athenaframework.org/Console/Application/#Athena::Console::Application--default-command so your command is executed by default instead of list. And/or if your application is only going to have a single command, checkout https://athenaframework.org/Console/Application/#Athena::Console::Application--single-command-applications.

paulocoghi commented 1 year ago

Thank you again George!