diff options
author | David Lechner <david@pybricks.com> | 2020-02-01 11:39:18 -0600 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-02-04 17:54:31 +1100 |
commit | 83439e38fc025bda79eec0096b8cc60379757206 (patch) | |
tree | 09fd27e3c92990e05bdfedd87370ea11704f275e /docs/unix | |
parent | 5a63bc5a448720c875da408fd1ecc0536124e516 (diff) |
unix/main: Add command-line -h option for printing help text.
This adds a -h option to print the usage help text and adds a new, shorter
error message that is printed when invalid arguments are given. This
behaviour follows CPython (and other tools) more closely.
Diffstat (limited to 'docs/unix')
-rw-r--r-- | docs/unix/quickref.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/unix/quickref.rst b/docs/unix/quickref.rst index ea0e6865c..a5180fa6c 100644 --- a/docs/unix/quickref.rst +++ b/docs/unix/quickref.rst @@ -8,7 +8,7 @@ Command line options Usage:: - micropython [ -i ] [ -O<level> ] [ -v ] [ -X <option> ] [ -c <command> | -m <module> | <script> ] [ <args> ] + micropython [ -h ] [ -i ] [ -O<level> ] [ -v ] [ -X <option> ] [ -c <command> | -m <module> | <script> ] [ <args> ] Invocation options: @@ -38,6 +38,10 @@ interactive REPL mode. General options: +.. option:: -h + + Prints a help message containing the command line usage and exits. + .. option:: -i Enables inspection. When this flag is set, MicroPython will enter the |