Skip to content

Follow GNU CLI conventions for options: e.g. accept -T=4 and -T4 not just -T 4 #35

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

Open
corneliusroemer opened this issue Jul 18, 2024 · 0 comments

Comments

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Jul 18, 2024

I've noticed that the CLI interface doesn't allow common patterns used by most CLI tools, concretely: "don't require args to be passed after whitespace, also accept after = and when being a short arg allow them directly (-T4 is same as -T 4)

Right now I get this:

$ ./cmaple -T4
Invalid "-T4" option.
$ ./cmaple -T=4
Invalid "-T=4" option.

This is a great guide for making nice CLIs: https://clig.dev/#arguments-and-flags

Some concrete libraries you could use:

@corneliusroemer corneliusroemer changed the title Follow GNU CLI conventions for options: e.g. accept -T=4 and -T4 not just -T 4` Follow GNU CLI conventions for options: e.g. accept -T=4 and -T4 not just -T 4 Jul 18, 2024
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

1 participant