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

Improve help messages #156

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Improve help messages #156

merged 1 commit into from
Oct 21, 2024

Conversation

popematt
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Commands now support a "regular" about, and a long_about. This allows us to put the shorter one into the listing of subcommands and the longer one can go in the more detailed help.
  • Reformat the help messaging for ion stats so that it wraps at a similar line length as the other commands.
  • Adds a comment to the end of the top-level help directing users to open an issue in ion-cli if they are experiencing a problem with the CLI.
  • Adds a little surprise for when you are upset with Ion.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +30 to +35
.long_about("Print the analysis report of the input data stream, including the total number of\n\
top-level values, their minimum, maximum, and mean sizes, and plot the size distribution of\n\
the input stream. The report should also include the number of symbol tables in the input\n\
stream, the total number of different symbols that occurred in the input stream, and the\n\
maximum depth of the input data stream. Currently, this subcommand only supports data\n\
analysis on binary Ion data.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a good use for indoc: https://github.com/dtolnay/indoc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I actually think that something like https://crates.io/crates/textwrap would be potentially more useful so that we don't have to worry about line wrapping any of our help text, but I'm saving that for another day.

@popematt popematt merged commit 6b4e9db into amazon-ion:main Oct 21, 2024
3 checks passed
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.

2 participants