Update version help command #854
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm sure that this could be considered a personal preference, but wanted to submit to see what others think.
When checking for the version number of a cli I always assume that
-vis available as a short name and try that before--version. However, using the built in version property onCommandConfigurationonly enables the long format of--version. If we want to enable-vthen we have to implement our own version flag and ignore the property in the configuration.This is just a small change to make
-vavailable as a short name for the version flag.If we wanted to make this more flexible then we could extend
CommandConfigurationto also accept aNameSpecificationfor the version. I just went with the simplest approach for now.I also understand that an argument could be made that this would conflict with a flag called
verbose. Someone may want to use-vas the short name for that. By making-vavailable inCommandConfigurationit removes the option when having both of these flags in a single command. I feel like having the version number is more common than having a flag called verbose, so I personally wouldn't consider it a blocker as the verbose flag could just use the long name or a different custom short name. Just my opinion. Curious what y'all think.Checklist