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

comm: move help strings to markdown file #4443

Merged

Conversation

cakebaker
Copy link
Contributor

#4368 and add an "after help" text.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/tee. tests/misc/tee is passing on 'main'. Maybe you have to rebase?

@tertsdiepraam
Copy link
Member

I think we need another category apart from after help. I think the format of --help/uudoc should be something like this:

<usage>
<short summary>

<long description>

<options>

<after help>

What GNU does is that they explain some more about the options in the after help. So for instance, explaining the valid formats that an argument accepts.

I think this is what long_help in clap is for, but we weren't really using that. We could adapt the macros such that it uses the first line of the current about as short summary and the long description as the rest. For now I suppose using after help is fine though.

@cakebaker
Copy link
Contributor Author

Hm, I'm not sure whether an additional category is needed because help_about! already supports multi-line text (for example, base32 uses it).

Clap's long_help is not helpful in this situation because it defines the long help for a single argument and not for the program, see https://docs.rs/clap/latest/clap/struct.Arg.html#method.long_help

@tertsdiepraam
Copy link
Member

Ah got confused. I meant long_about. Nevertheless, I think you're right and we do not need anything else. I think what you wrote as after help here belongs in the about. Do you agree?

@cakebaker cakebaker force-pushed the comm_move_help_strings_to_markdown_file branch from 62bc50f to 028b970 Compare February 27, 2023 16:33
@cakebaker
Copy link
Contributor Author

Yes, that makes sense and I fixed it in the latest push.

@tertsdiepraam tertsdiepraam merged commit f5a9ffe into uutils:main Feb 27, 2023
@tertsdiepraam
Copy link
Member

Thanks!

@cakebaker cakebaker deleted the comm_move_help_strings_to_markdown_file branch February 28, 2023 06:01
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