Make `--version` a non-global option
Resolves https://github.com/python-poetry/cleo/issues/142.
I would prefer for the --version to be available only on the application level. I don't see why it should work with list or help commands, since app list --version suggests that we want a version of list not of the app.
I would prefer for the
--versionto be available only on the application level. I don't see why it should work withlistorhelpcommands, sinceapp list --versionsuggests that we want a version oflistnot of the app.
I share the same feeling, so I'm glad to read that. I'll rework the PR in that sense.
@mkniewallner I think I am gonna delay this feature to the 1.1 release. Took a look into the code and in the current state, this is a non-trivial issue to add an app-level only option. I plan on refactoring and improving the parser past-1.0 and with what I have in mind, this should be much easier then.
@mkniewallner I think I am gonna delay this feature to the 1.1 release. Took a look into the code and in the current state, this is a non-trivial issue to add an app-level only option. I plan on refactoring and improving the parser past-1.0 and with what I have in mind, this should be much easier then.
Makes sense. I didn't think it would require heavy changes when starting this PR, so entirely re-thinking the approach sounds better.