mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
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.
This commit is contained in:
committed by
Damien George
parent
5a63bc5a44
commit
83439e38fc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user