ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
448 stars 92 forks source link

Option -h does not list itself #487

Closed wh81752 closed 3 years ago

wh81752 commented 3 years ago

Option -h (help) does not list itself as option, i.e.

$ asciidoctor-web-pdf -h 2>&1 | fgrep -- -h    
  --no-header-footer, -s  suppress enclosing document structure and output an embedded document  [boolean]
wh81752 commented 3 years ago

Ah, I got it. There is no such thing as option -h. The behaviour is just to render usage / help info on any unsupported option.

wh81752 commented 3 years ago

Hmm, I guess it is good style to follow GNU command line standards https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html

Btw:

> asciidoctor-web-pdf --version
Asciidoctor Web PDF 1.0.0-alpha.12 using Asciidoctor.js 2.2.1 (Asciidoctor 2.0.12) [https://asciidoctor.org]
Runtime Environment (node v12.18.1 on darwin)
CLI version 3.4.0

while

/Users/geronimo1/bin/asciidoctor-web-pdf -h 2>&1 | fgrep -- version

i.e. usage info does not list option --version.

ggrossetie commented 3 years ago

Upstream issue: https://github.com/asciidoctor/asciidoctor-cli.js/issues/149

ggrossetie commented 3 years ago

With @asciidoctor/core 3.5.0:

$ asciidoctor-web-pdf -h 2>&1 | fgrep -- --help
      --help              print a help message