diff options
author | David Lechner <david@pybricks.com> | 2020-01-31 10:14:31 -0600 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-02-04 17:53:35 +1100 |
commit | 5a63bc5a448720c875da408fd1ecc0536124e516 (patch) | |
tree | 7c67f8ec6455717def6d9ec075e121b0e2c3d06a | |
parent | c8d2f7838f1d3ffd5e584fc380395516a7d136ec (diff) |
unix/main: Add #if guard around -v option usage and document -i/-m opts.
This commit modifies the usage() function to only print the -v option help
text when MICROPY_DEBUG_PRINTERS is enabled. The -v option requires this
build option to be enabled for it to have any effect.
The usage text is also modified to show the -i and -m options, and also
show that running a command, module or file are mutually exclusive.
-rw-r--r-- | ports/unix/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/unix/main.c b/ports/unix/main.c index deda8eb70..14283321f 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -305,9 +305,12 @@ STATIC int do_str(const char *str) { STATIC int usage(char **argv) { printf( -"usage: %s [<opts>] [-X <implopt>] [-c <command>] [<filename>]\n" +"usage: %s [<opts>] [-X <implopt>] [-c <command> | -m <module> | <filename>]\n" "Options:\n" +"-i : enable inspection via REPL after running command/module/file\n" +#if MICROPY_DEBUG_PRINTERS "-v : verbose (trace various operations); can be multiple\n" +#endif "-O[N] : apply bytecode optimizations of level N\n" "\n" "Implementation specific options (-X):\n", argv[0] |