mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
-R without an adjoined argument now checks whether the next argument
begins with a "-" to determine if it's the -R value versus another option.
This commit is contained in:
parent
7e9ffa3c12
commit
b54aca219e
2 changed files with 4 additions and 8 deletions
|
@ -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
|
||||
(
|
||||
|
|
3
main.c
3
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':
|
||||
|
|
Loading…
Add table
Reference in a new issue