From 5a63bc5a448720c875da408fd1ecc0536124e516 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 31 Jan 2020 10:14:31 -0600 Subject: [PATCH] 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. --- ports/unix/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/unix/main.c b/ports/unix/main.c index deda8eb708..14283321f6 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 [] [-X ] [-c ] []\n" +"usage: %s [] [-X ] [-c | -m | ]\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]