Add @custom_version_option, freeze @version_option#3581
Conversation
9a54d78 to
dddd703
Compare
dddd703 to
13f5085
Compare
@custom_version_option, freeze @version_option@custom_version_option, freeze @version_option
|
@kdeldycke This looks good. Allows for simple customization. I would change the echo to a normal print. I think for most things we can move away from echo. |
|
Let me know what you think about print instead of echo is this case. |
The reason we use So unless you want to reintroduce ANSI-related issues, it's better to do the reverse: always use |
8115d6c to
4993125
Compare
I used the opportunity to grep into the code and docs and yes, we are properly using |
4993125 to
4453103
Compare
|
Yeah, |
This is an attempt to address the design discussion we started in #3527 about
@version_optionextensibility.What's in this PR:
.. note::admonition to point to@version_optionfreeze.@custom_version_optionthat mirrors@help_optionand@version_optionand takes a callback for a custom message.I did not take the class-based approach here, as it reminded me of the
HelpOptionclass that I was too fast to add in #2563 (v8.1.8) then had to remove in #2832/#2840 (v8.2.0).If I like the explicitness of the freeze admonition, I don't like the rest of the code: the naming of
@custom_version_optionand the apparent duplication with@version_option. But I produced this PR anyway to explore the effect of our policy and to have a concrete example to discuss.