command-line: need to check for run differently.

db4
John Benediktsson 2012-08-13 21:06:57 -07:00
parent 2109af55ad
commit 2854ecd4ec
1 changed files with 7 additions and 7 deletions

View File

@ -62,19 +62,19 @@ SYMBOL: command-line
[ source-file main>> [ execute( -- ) ] when* ] bi
] with-variable ;
: run-script? ( rest first -- rest first ? )
over empty? not "run" get-global and ;
: parse-command-line ( args -- )
[ command-line off script off ] [
: (parse-command-line) ( run? args -- )
[ command-line off script off drop ] [
unclip "-" ?head
[ param parse-command-line ]
[ param (parse-command-line) ]
[
run-script? [ prefix f ] when
rot [ prefix f ] when
script set command-line set
] if
] if-empty ;
: parse-command-line ( args -- )
[ [ "-run=" head? ] any? ] keep (parse-command-line) ;
SYMBOL: main-vocab-hook
: main-vocab ( -- vocab )