klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
2k stars 296 forks source link

Add `--help` command line argument #1481

Open hawkerm opened 10 months ago

hawkerm commented 10 months ago

Is your feature request related to a problem? Please describe.

There's a few new command line arguments added in 2.8.0, but it's not easy to find their documentation from the release notes, the documentation, the readme, or more importantly the command line itself. i.e. Running:

 Twine.exe --help

Does nothing but run Twine...

It'd be great to have this instead list out the options and brief description of what they do and their parameters like most tools do.

Describe the solution you'd like.

Running Twine on the command line with --help should display help in the terminal on using other arguments to Twine without running twine.

Describe alternatives you've considered.

None

Additional context on this suggestion.

Running on Windows

Presubmission checklist

greyelf commented 10 months ago

@hawkerm While I agree it might be nice for the Twine 2.x application to include support for a --help like command option, it isn't unusually for a Graphical User Interface (GUI) based application not to include such, because they aren't Command Line Interface (CLI) based.

eg. The Chrome web-browser (another GUI based app) supports a wide range of command line switches (third-party site), even apparently --help. But if you execute chrome.exe --help in a command shell a Chrome window will be opened, instead of a 'help' like description being displayed in the shell.

klembot commented 10 months ago

There's a minor hassle here in that implementing this means we'd have to update documentation in two places (the reference and --help output), but I think it makes sense to do whatever is the norm with GUI apps that take command-line swithces. If there are examples of GUI apps that do show help when run this way, I'm open to implementing this.

hawkerm commented 10 months ago

Visual Studio Code is a counter example and has help on the command line for code --help though if you just type code it launches the GUI app.