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

feature: Print long help text for options #23

Merged
merged 3 commits into from
Jun 15, 2024

Conversation

ilyagr
Copy link
Contributor

@ilyagr ilyagr commented Jun 13, 2024

This fixes #20.

I separated this from #22 since there is a bit more logic here. The first commit is shared with #22, since test changes are confusing without that commit. I will rebase one of the PRs if you merge the other (unless you do it).

This duplicates janstarke#2, but is rebased onto this repo's main branch.

@ilyagr ilyagr force-pushed the longhelp-upstr branch 3 times, most recently from 85ad6a4 to 7ad8aa3 Compare June 14, 2024 06:56
Fixes ConnorGray#20

I wrote my own `indent` function to avoid introducing any new dependencies
(`indent` or `textwrap` crate).
@ConnorGray
Copy link
Owner

This is great, thank you @ilyagr for these nice QoL contributions! 🧹 🙂

@ConnorGray ConnorGray changed the title Print long help text for options feature: Print long help text for options Jun 15, 2024
@ConnorGray ConnorGray merged commit f2ed6eb into ConnorGray:main Jun 15, 2024
1 check passed
@ilyagr
Copy link
Contributor Author

ilyagr commented Jun 15, 2024

Thank you very much for merging this, #22, as well as starting and maintaining this project! I'm very glad to see that it is not abandoned.

I use clap-markdown to make https://martinvonz.github.io/jj/prerelease/cli-reference/, which is possible because of this project, and should improve significantly once the new version of clap-markdown is released. We'll finally be able to make the Warning in the beginning less scary.

@ilyagr
Copy link
Contributor Author

ilyagr commented Jun 15, 2024

Here's the diff: https://github.com/martinvonz/jj/pull/3891/files#diff-241a36d22079376383ba2fbdd9921ba5b1492f2ce080a8b965373b52cf92656e. I'm just sharing it because I'm quite happy about it. It might take me a bit to actually merge that PR.

@ilyagr ilyagr deleted the longhelp-upstr branch June 15, 2024 21:57
@ConnorGray
Copy link
Owner

That's awesome @ilyagr, I'm glad to see the new version is improving things for you! 🙂

Please let me know if there are any other features that would be useful to you!

As a sneak peak for you as well: I'm currently working on a small overhaul to clap-markdown to use a Markdown AST representation internally instead of a raw string builder, which should make it much easier to add more user-customizable behavior to clap-markdown in a structured way.

@gibfahn
Copy link

gibfahn commented Jul 25, 2024

Just came here to work out how to fix this, and it's already fixed 🎉 . Thanks folks for making this library better.

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.

Long help text for options is not printed
3 participants