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

Clarify documentation for --help output in shell scripts #20

Closed
jotaen4tinypilot opened this issue Apr 4, 2024 · 0 comments · Fixed by #24
Closed

Clarify documentation for --help output in shell scripts #20

jotaen4tinypilot opened this issue Apr 4, 2024 · 0 comments · Fixed by #24
Assignees
Labels

Comments

@jotaen4tinypilot
Copy link
Contributor

In our style guide, we have an example that demonstrates the structure/format of the --help text output. We could make this it’s own section instead of having it implicit in the “Parsing Command Line Flags” section, and also elaborate a bit more. There are also some details missing, like how to declare optional flags.

We could also document in which situations we print the full help text. Lately, we’ve been starting to always print the full help text for every input error, e.g. for absent mandatory flags, or for malformed flags. Especially if the help text is long, I found that a little hard to work with, though, because the actual specific error message can get buried, and might be easy to miss. Example: this is the full error output of the publish-release script, if you forget to specify the $GITHUB_TOKEN env variable; only the first of all 52 lines is actually relevant/specific to the error.

Related/Origin #19.

@jdeanwallace jdeanwallace self-assigned this Apr 16, 2024
jdeanwallace added a commit that referenced this issue Apr 17, 2024
Resolves #20

This PR suggests that we avoid printing the help text on every error
message and direct users to use the `--help` flag for more information.


<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/style-guides/24"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants