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

Add --help CLI argument #56

Closed
sohang3112 opened this issue Oct 20, 2023 · 10 comments
Closed

Add --help CLI argument #56

sohang3112 opened this issue Oct 20, 2023 · 10 comments
Assignees

Comments

@sohang3112
Copy link
Contributor

Add command line help by identifying flags --help or -h. All CLI tools have these arguments, so it's a bit strange that 2048 doesn't.

@mevdschee
Copy link
Owner

True and some have -v or --version too :-)

@mevdschee mevdschee self-assigned this Oct 20, 2023
@Rudxain
Copy link
Contributor

Rudxain commented Oct 21, 2023

All CLI tools have these arguments, so it's a bit strange that 2048 doesn't.

I'm unsure if that's necessary here, as the README is helpful, and the game is simple and intuitive. But it's still "good practice" in terms of design.

pedantic correction (nit-pick): It should be "parameters" rather than "arguments", in this case. Params are named arg values. But since help doesn't "store" any args, it should be referred-to as a "flag" or "switch"

@sohang3112
Copy link
Contributor Author

@mevdschee Should I raise a PR to add --help and --version flags?

@sohang3112
Copy link
Contributor Author

@mevdschee Please respond, should I raise a PR for this if you're ok with this change?

@mevdschee
Copy link
Owner

I'm not sure what exactly it is you propose, but if you want/like to make a PR, you may. I like any contributions to be as small as possible, so the smaller your PR is, the more likely I'll merge it.

@sohang3112
Copy link
Contributor Author

sohang3112 commented Jan 27, 2025

Ok great, I'll raise a PR in a while. Not proposing any radical change, just adding --help to show existing options (and --version).

@sohang3112
Copy link
Contributor Author

@mevdschee Raised PR to add --help, --version options. See pull request #64 for the implementation. Please review it.

@mevdschee
Copy link
Owner

mevdschee commented Jan 27, 2025

Thank you for your effort. I see the code defaults to color scheme than it used to. The version is not correct. Also the readme change is not correct nor is the Spanish version updated. It also seemed like you didn't use a formatter. I'll see what I can make of it.

NB: I released your code as part of version v1.0.2

@sohang3112
Copy link
Contributor Author

I see the code defaults to color scheme than it used to. The version is not correct. Also the readme change is not correct nor is the Spanish version updated. It also seemed like you didn't use a formatter.

Sorry for the mistakes, will keep in mind for future. You may want to consider making a CONTRIBUTING.md that's helpful for new contributors.

@mevdschee
Copy link
Owner

Sorry for the mistakes, will keep in mind for future.

Don't worry about it, these were all minor. Thank you for your contribution.

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

3 participants