command-line: need to check for run differently.
parent
2109af55ad
commit
2854ecd4ec
|
@ -62,19 +62,19 @@ SYMBOL: command-line
|
||||||
[ source-file main>> [ execute( -- ) ] when* ] bi
|
[ source-file main>> [ execute( -- ) ] when* ] bi
|
||||||
] with-variable ;
|
] with-variable ;
|
||||||
|
|
||||||
: run-script? ( rest first -- rest first ? )
|
: (parse-command-line) ( run? args -- )
|
||||||
over empty? not "run" get-global and ;
|
[ command-line off script off drop ] [
|
||||||
|
|
||||||
: parse-command-line ( args -- )
|
|
||||||
[ command-line off script off ] [
|
|
||||||
unclip "-" ?head
|
unclip "-" ?head
|
||||||
[ param parse-command-line ]
|
[ param (parse-command-line) ]
|
||||||
[
|
[
|
||||||
run-script? [ prefix f ] when
|
rot [ prefix f ] when
|
||||||
script set command-line set
|
script set command-line set
|
||||||
] if
|
] if
|
||||||
] if-empty ;
|
] if-empty ;
|
||||||
|
|
||||||
|
: parse-command-line ( args -- )
|
||||||
|
[ [ "-run=" head? ] any? ] keep (parse-command-line) ;
|
||||||
|
|
||||||
SYMBOL: main-vocab-hook
|
SYMBOL: main-vocab-hook
|
||||||
|
|
||||||
: main-vocab ( -- vocab )
|
: main-vocab ( -- vocab )
|
||||||
|
|
Loading…
Reference in New Issue