Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version flag inconsistent with other packages #1621

Closed
jbburf opened this issue Oct 10, 2021 · 6 comments
Closed

Version flag inconsistent with other packages #1621

jbburf opened this issue Oct 10, 2021 · 6 comments

Comments

@jbburf
Copy link

jbburf commented Oct 10, 2021

Hi, I raised this on the expo-cli which pointed me back here. I've gotten used to using either the "-v" flag or the "--version" flag to get a packages version from the CLI. I've checked the following packages and they all follow this convention: node, nvm, npm, yarn, make, brew. Why have you all standardized around "-V" instead of "-v"?

@shadowspawn
Copy link
Collaborator

shadowspawn commented Oct 11, 2021

The reasoning was to leave the lowercase -v option available for the program, especially for "verbose". The default Commander flags date back 10 years:

Related issues: #509 #560 #1182 #1258

External references:

(Note: the default flags used by Commander for version are -V, --version, but the author may customise the version flags and description using .version().)

@shadowspawn
Copy link
Collaborator

One thing that is widely consistent across applications and cli frameworks is the long flag --version.

@kuncevic

This comment was marked as off-topic.

@shadowspawn

This comment was marked as off-topic.

@shadowspawn
Copy link
Collaborator

An answer was provided, and no further activity in a month. Closing this as resolved.

Feel free to open a new issue if it comes up again, with new information and renewed interest.

@shadowspawn
Copy link
Collaborator

For interest a couple more references:

From https://clig.dev/#arguments-and-flags

--version: Version.
-v: This can often mean either verbose or version. You might want to use -d for verbose and this for version, or for nothing to avoid confusion.

From https://learn.microsoft.com/en-us/dotnet/standard/commandline/syntax

  • --version is the built-in option to display the version in System.CommandLine
  • -v should only be used as the short form of --verbosity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants