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

Added command line flags for help and version #888

Merged
merged 1 commit into from Mar 2, 2020
Merged

Added command line flags for help and version #888

merged 1 commit into from Mar 2, 2020

Conversation

tinywombat765
Copy link

I added help and version cli flags

Signed-off-by: zethra benaagoldberg@gmail.com

@dani-garcia
Copy link
Owner

Looks good to me, I assume this auto generates the --help flag by itself?
I'd change the short flag of --version to a lowercase v, which I think is the most common option.

@jjlin
Copy link
Contributor

jjlin commented Mar 2, 2020

-V is pretty common too, especially when -v is taken for verbose.

@tinywombat765
Copy link
Author

@dani-garcia Yes, help is auto generated. As far as the version flag, I was thinking along the same lines as @jjlin but I can change it if you want.

@dani-garcia
Copy link
Owner

Well I don't think we are going to be supporting a verbose flag when we have explicit log level options, so I think it's better to keep them all lowercase for the sake of consistency

Signed-off-by: zethra <benaagoldberg@gmail.com>
@mqus
Copy link
Contributor

mqus commented Mar 2, 2020

Regarding the version, wouldn't it be possible to use env!("CARGO_PKG_VERSION") as a backup, provided that the version in cargo.toml is kept up-to-date? (It's currently still at 1.0.0 though)

@dani-garcia
Copy link
Owner

It's an option, yeah, but it's another thing to keep track of before a release and if I ever forget to do it the release will end up with an incorrect version, which is worse than no version at all, I'd say.

@dani-garcia dani-garcia merged commit 1f775f4 into dani-garcia:master Mar 2, 2020
@dani-garcia
Copy link
Owner

thanks, @zethra!

@tinywombat765 tinywombat765 deleted the add_cli_args branch March 3, 2020 22:49
thelittlefireman pushed a commit to thelittlefireman/bitwarden_rs that referenced this pull request Mar 19, 2021
Added command line flags for help and version
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

Successfully merging this pull request may close these issues.

None yet

4 participants