From 83439e38fc025bda79eec0096b8cc60379757206 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 1 Feb 2020 11:39:18 -0600 Subject: [PATCH] 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. --- docs/unix/quickref.rst | 6 +++++- ports/unix/main.c | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/unix/quickref.rst b/docs/unix/quickref.rst index ea0e6865c1..a5180fa6cb 100644 --- a/docs/unix/quickref.rst +++ b/docs/unix/quickref.rst @@ -8,7 +8,7 @@ Command line options Usage:: - micropython [ -i ] [ -O ] [ -v ] [ -X