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

Bug: man page and --help are not consistent #134

Closed
zachriggle opened this issue Jul 20, 2021 · 5 comments
Closed

Bug: man page and --help are not consistent #134

zachriggle opened this issue Jul 20, 2021 · 5 comments
Assignees
Labels
C-bug Category: Something isn't working M-needs triage Meta: Maintainer label me!

Comments

@zachriggle
Copy link

Thanks again @chmln for creating a neat tool -- and thanks for bothering to create a man page at all, it's a rarity for FOSS command line tools.

Currently, the --help and man sd output each have different details listed.

  • --help is missing the EXAMPLES that the manpage has
  • man is missing some of the list of valid values for --flags, and is not formatted well
  • man and --help disagree on the names of the arguments (e.g. replace-with vs replace_with)
  • --help is missing the return codes
@xixixao
Copy link

xixixao commented Jan 6, 2023

I'll tack on here that for me on macOS the man page doesn't render examples correctly:

 Regex use. Let's trim some trailing whitespace
              $ echo 'lorem ipsum 23   ' | sd '' ''
              lorem ipsum 23

this is what I see in man sd, but the build.rs shows that it should include sd '\\s+$' ''

@CosmicHorrorDev CosmicHorrorDev self-assigned this May 12, 2023
@CosmicHorrorDev CosmicHorrorDev added C-bug Category: Something isn't working M-needs triage Meta: Maintainer label me! labels May 17, 2023
@CosmicHorrorDev CosmicHorrorDev added this to the v0.8.0 Release milestone May 17, 2023
@nc7s
Copy link
Contributor

nc7s commented Sep 5, 2023

If help message and man page can be unified then help2man might help.

@vassudanagunta
Copy link
Contributor

I'll tack on here that for me on macOS the man page doesn't render examples correctly:

 Regex use. Let's trim some trailing whitespace
              $ echo 'lorem ipsum 23   ' | sd '' ''
              lorem ipsum 23

I came here to report this as a bug. It is far more harmful than the man page and help page simply being different, thus deserving its own issue: #226.

@alerque
Copy link

alerque commented Sep 25, 2023

Instead of help2man this project should use the clap_mangen package to regenerate man pages that exactly match the CLI parsing at build time.

See also my comment here.

@CosmicHorrorDev
Copy link
Collaborator

This should be fixed with the merge of #231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Something isn't working M-needs triage Meta: Maintainer label me!
Projects
None yet
Development

No branches or pull requests

6 participants