File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ static void print_help(char **argv) {
318
318
printf (
319
319
"usage: %s [<opts>] [-X <implopt>] [-c <command> | -m <module> | <filename>]\n"
320
320
"Options:\n"
321
+ "--version : show version information\n"
321
322
"-h : print this help message\n"
322
323
"-i : enable inspection via REPL after running command/module/file\n"
323
324
#if MICROPY_DEBUG_PRINTERS
@@ -369,6 +370,10 @@ static void pre_process_options(int argc, char **argv) {
369
370
print_help (argv );
370
371
exit (0 );
371
372
}
373
+ if (strcmp (argv [a ], "--version" ) == 0 ) {
374
+ printf (MICROPY_BANNER_NAME_AND_VERSION "; " MICROPY_BANNER_MACHINE "\n" );
375
+ exit (0 );
376
+ }
372
377
if (strcmp (argv [a ], "-X" ) == 0 ) {
373
378
if (a + 1 >= argc ) {
374
379
exit (invalid_args ());
You can’t perform that action at this time.
0 commit comments