(command-line) parse-command-line
load-vocab-roots
run-user-init
- "e" get [ eval( -- ) ] when*
- ignore-cli-args? not script get and
- [ run-script ] [ "run" get run ] if*
+
+ "e" get script get or [
+ "e" get [ eval( -- ) ] when*
+ script get [ run-script ] when*
+ ] [
+ "run" get run
+ ] if
+
output-stream get [ stream-flush ] when*
0 exit
] [ print-error 1 exit ] recover
HELP: default-cli-args
{ $description "Sets global variables corresponding to default command line arguments." } ;
-HELP: ignore-cli-args?
-{ $values { "?" "a boolean" } }
-{ $description "On Mac OS X, source files to run are supplied by the Cocoa API, so to avoid running them twice the startup code has to call this word." } ;
-
ARTICLE: "runtime-cli-args" "Command line switches for the VM"
"A handful of command line switches are processed by the VM and not the library. They control low-level features."
{ $table
main-vocab "run" set
] bind ;
-: ignore-cli-args? ( -- ? )
- os macosx? "run" get "ui" = and ;
-
[ default-cli-args ] "command-line" add-startup-hook