diff --git a/doc/chibi-scheme.1 b/doc/chibi-scheme.1 index 49d2159b..583f6673 100644 --- a/doc/chibi-scheme.1 +++ b/doc/chibi-scheme.1 @@ -87,13 +87,8 @@ or its shortcut .SH OPTIONS -Space is optional between options and their arguments, with the -exception of -.I --R -for which the argument is optional, and therefore if present must -occur without a space. Options without arguments may not be chained -together. +Space is optional between options and their arguments. Options +without arguments may not be chained together. To reduce the need for shell escapes, options with module arguments ( diff --git a/main.c b/main.c index ace00328..8fec1648 100644 --- a/main.c +++ b/main.c @@ -542,7 +542,8 @@ void run_main (int argc, char **argv) { break; #endif case 'R': - main_module = argv[i][2] == '\0' ? "chibi.repl" : argv[i]+2; + main_module = argv[i][2] != '\0' ? argv[i]+2 : + (i+1 < argc && argv[i+1][0] != '-') ? argv[++i] : "chibi.repl"; if (main_symbol == NULL) main_symbol = "main"; break; case 'r':