python-launcher icon indicating copy to clipboard operation
python-launcher copied to clipboard

Manpage typos

Open defjaf opened this issue 2 years ago • 3 comments

Describe the bug man py incorrectly shows -list and -help options (i.e., with a single "-")

(Also, possibly a separate issue, the "synopsis" should probably show the help and list options.)

To Reproduce $ man py

...
SYNOPSIS
       py [-[X]/[X.Y]] ...
...
OPTIONS
       -h/–help
              Print a help message and exit; must be specified on its own.

       –list  List all known interpreters (except activated virtual environment); must be specified on its own.

Expected behaviour Above should show --list and --help.

System Details (please complete the following information):

  • OS: macOS 13.5 with homebrew python 3.11
  • Shell: bash
  • Launcher Version: 1.0.0

defjaf avatar Aug 16 '23 10:08 defjaf

It's actually written down correctly in the Markdown file, e.g.:

https://github.com/brettcannon/python-launcher/blob/04963c5f02065d0fb019810d9a3f1b67e10ccd47/man-page/py.1.md?plain=1#L56

Unfortunately, pandoc is not translating it appropriately:

https://github.com/brettcannon/python-launcher/blob/04963c5f02065d0fb019810d9a3f1b67e10ccd47/man-page/py.1#L59

It might require some escaping in the Markdown or some flag to pandoc to not translate -- to \[en].

brettcannon avatar Aug 16 '23 18:08 brettcannon

https://pandoc.org/demo/pandoc.1.md is how pandoc uses Markdown for its man page; looks like an escape for the first dash is what's necessary, e.g., \--help.

It also seems the more common style is a comma separating the options (at least comparing pandoc and curl's man pages), e.g., -h, \--help

brettcannon avatar Aug 16 '23 18:08 brettcannon

https://pandoc.org/try/?text=&from=markdown&to=man is useful for trying to figure out what pandoc will do.

brettcannon avatar Aug 16 '23 18:08 brettcannon