We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51663b9 commit 838f212Copy full SHA for 838f212
1 file changed
ports/unix/main.c
@@ -318,6 +318,7 @@ static void print_help(char **argv) {
318
printf(
319
"usage: %s [<opts>] [-X <implopt>] [-c <command> | -m <module> | <filename>]\n"
320
"Options:\n"
321
+ "--version : show version information\n"
322
"-h : print this help message\n"
323
"-i : enable inspection via REPL after running command/module/file\n"
324
#if MICROPY_DEBUG_PRINTERS
@@ -369,6 +370,10 @@ static void pre_process_options(int argc, char **argv) {
369
370
print_help(argv);
371
exit(0);
372
}
373
+ if (strcmp(argv[a], "--version") == 0) {
374
+ printf(MICROPY_BANNER_NAME_AND_VERSION "; " MICROPY_BANNER_MACHINE "\n");
375
+ exit(0);
376
+ }
377
if (strcmp(argv[a], "-X") == 0) {
378
if (a + 1 >= argc) {
379
exit(invalid_args());
0 commit comments