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 flag and usage message #48

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

bretbrownjr
Copy link
Collaborator

Add an initial usage and --help for the cps-config utility. The goal is to give potential contributors to this repository some idea about what the utility is for based on only looking at a --help message.

Add an initial usage and --help for the cps-config utility. The
goal is to give potential contributors to this repository some
idea about what the utility is for based on only looking at a
--help message.
@bretbrownjr
Copy link
Collaborator Author

bretbrownjr commented Mar 11, 2024

@lunacd @dcbaker cxxopts is a nice library, but I'm expecting we'll want some more powerful features sooner or later:

  • subcommands
  • an epilog
    • examples
    • support

If you want me to open an issue first, let me know. Otherwise, don't be surprised if I revisit the UX for cps-config from the command line in a future PR. I'd still keep a simple way to serve as a drop-in replacement for pkg-config of course. Ideally, if we see argv[0] is pkg-config, that's the default operating mode. pkgconf does this and I think it's nice.

@bretbrownjr
Copy link
Collaborator Author

bretbrownjr commented Mar 11, 2024

This PR was inspired by me running cps-config --help and getting a raw parsing error message instead of what you'd expect. We should also catch unexpected arguments more elegantly, but I'm thinking that's another PR. See #48 (comment).

@bretbrownjr bretbrownjr mentioned this pull request Mar 11, 2024
@dcbaker dcbaker merged commit 1825bb8 into cps-org:main Mar 12, 2024
3 checks passed
@bretbrownjr bretbrownjr deleted the add-help branch March 17, 2024 20:23
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

2 participants