coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

uucore_procs: extract "about" and "usage" info from new help structure

Open cakebaker opened this issue 2 years ago • 5 comments

This PR adds the implementation for the new help structure discussed in https://github.com/uutils/coreutils/issues/4368, which no longer uses Usage and About headers:

# numfmt
```
numfmt [OPTION]... [NUMBER]...
```

Convert numbers from/to human-readable strings

The PR

  • adds a new help_about macro to get the about text from the help file
  • modifies the existing help_usage macro accordingly
  • updates all help files to the new structure
  • replaces the usage of help_section!("about", "example.md") with help_about!("example.md")

cakebaker avatar Feb 17 '23 16:02 cakebaker

GNU testsuite comparison:

Congrats! The gnu test tests/misc/tee is no longer failing!
Congrats! The gnu test tests/misc/timeout is no longer failing!

github-actions[bot] avatar Feb 17 '23 17:02 github-actions[bot]

Looks good to me! @sylvestre do you agree with this format?

tertsdiepraam avatar Feb 18 '23 09:02 tertsdiepraam

Do we have protections in place in case it is doing unexpected parsing ?

sylvestre avatar Feb 18 '23 10:02 sylvestre

Do you want to check the parsed output or do you want the parsing to be more strict? I suppose we could add a check that the output is at least non-empty?

tertsdiepraam avatar Feb 18 '23 10:02 tertsdiepraam

i am wondering if making a mistake in the md won't merge the usage & about :)

sylvestre avatar Feb 18 '23 16:02 sylvestre

let's see :)

sylvestre avatar Feb 19 '23 10:02 sylvestre