command-line: if -e= is passed, don't run main vocab after evaluation ends
parent
aadf2873d1
commit
d4435ed32a
|
@ -8,9 +8,14 @@ namespaces eval kernel vocabs.loader io ;
|
||||||
(command-line) parse-command-line
|
(command-line) parse-command-line
|
||||||
load-vocab-roots
|
load-vocab-roots
|
||||||
run-user-init
|
run-user-init
|
||||||
"e" get [ eval( -- ) ] when*
|
|
||||||
ignore-cli-args? not script get and
|
"e" get script get or [
|
||||||
[ run-script ] [ "run" get run ] if*
|
"e" get [ eval( -- ) ] when*
|
||||||
|
script get [ run-script ] when*
|
||||||
|
] [
|
||||||
|
"run" get run
|
||||||
|
] if
|
||||||
|
|
||||||
output-stream get [ stream-flush ] when*
|
output-stream get [ stream-flush ] when*
|
||||||
0 exit
|
0 exit
|
||||||
] [ print-error 1 exit ] recover
|
] [ print-error 1 exit ] recover
|
||||||
|
|
|
@ -37,10 +37,6 @@ HELP: main-vocab
|
||||||
HELP: default-cli-args
|
HELP: default-cli-args
|
||||||
{ $description "Sets global variables corresponding to default command line arguments." } ;
|
{ $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"
|
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."
|
"A handful of command line switches are processed by the VM and not the library. They control low-level features."
|
||||||
{ $table
|
{ $table
|
||||||
|
|
|
@ -67,7 +67,4 @@ SYMBOL: main-vocab-hook
|
||||||
main-vocab "run" set
|
main-vocab "run" set
|
||||||
] bind ;
|
] bind ;
|
||||||
|
|
||||||
: ignore-cli-args? ( -- ? )
|
|
||||||
os macosx? "run" get "ui" = and ;
|
|
||||||
|
|
||||||
[ default-cli-args ] "command-line" add-startup-hook
|
[ default-cli-args ] "command-line" add-startup-hook
|
||||||
|
|
Loading…
Reference in New Issue