From 2109af55adadea1d24d6e3dd67239593950abdbf Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 13 Aug 2012 20:57:39 -0700 Subject: [PATCH] command-line: need to check rest of args. --- basis/command-line/command-line.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/command-line/command-line.factor b/basis/command-line/command-line.factor index 0b24d27603..71f87d8658 100644 --- a/basis/command-line/command-line.factor +++ b/basis/command-line/command-line.factor @@ -62,12 +62,15 @@ 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 ] [ unclip "-" ?head [ param parse-command-line ] [ - "run" get-global [ prefix f ] when + run-script? [ prefix f ] when script set command-line set ] if ] if-empty ;