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

Support "-v" as alternative command line argument for "--version" #22656

Closed
skin27 opened this issue Jun 23, 2023 · 5 comments
Closed

Support "-v" as alternative command line argument for "--version" #22656

skin27 opened this issue Jun 23, 2023 · 5 comments

Comments

@skin27
Copy link

skin27 commented Jun 23, 2023

Consider the following:

D:\intellij\workspace>java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10)
OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)

D:\intellij\workspace>npm -v
9.5.1

D:\intellij\workspace>jhipster --version
8.0.0-beta.1

D:\intellij\workspace>jhipster -v
error: unknown option '-v'

I think that -v as a short form of --version is very common. Maybe support that command line option as well as alternative to the --version.

@mraible
Copy link
Contributor

mraible commented Jun 23, 2023

I don't think this is necessary. Java supports --version now and supporting its old -version seems like we'd be going backward.

@mraible mraible closed this as completed Jun 23, 2023
@skin27
Copy link
Author

skin27 commented Jun 23, 2023

I don't ask to support -version (that was just an example on how people try to get the version when they have a Java background). The feature request was to support "-v" as a short version of "--version".

It's very common that one minus with letter is the short form of two minus signs with a descriptive word.

Example is npm. There you can both use npm -v or npm --version

@mraible
Copy link
Contributor

mraible commented Jun 23, 2023

Makes sense. Re-opening to add a -v option.

@mraible mraible reopened this Jun 23, 2023
@mshima
Copy link
Member

mshima commented Jun 24, 2023

Commander default is -V if there is no objection PR is welcome

@deepu105
Copy link
Member

deepu105 commented Jul 2, 2023

To me this is extremely low priority so feel free to contribute this as a PR. Originally when I wrote the CLI there was some issue with using -v due to some conflict with verbose or something but that was ages ago.

@deepu105 deepu105 closed this as completed Jul 2, 2023
@DanielFran DanielFran added this to the 8.0.0-beta.2 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants