--run command linen option
authorClaus Gittinger <cg@exept.de>
Fri, 13 Jan 2012 13:02:50 +0100
changeset 1224 cf1526b27e15
parent 1223 630b5b21919f
child 1225 163ec4196291
--run command linen option
private.rc
--- a/private.rc	Fri Jan 13 13:02:16 2012 +0100
+++ b/private.rc	Fri Jan 13 13:02:50 2012 +0100
@@ -223,6 +223,8 @@
 "/
 Smalltalk isPlugin ifFalse:[
     Smalltalk addStartBlock:[
+	|i fn|
+
 	"/
 	"/ start some views ...
 	"/ you can add all stuff you'd like to come up by default
@@ -262,6 +264,13 @@
 
 	UserPreferences current flyByHelpActive ifTrue:[
 	    FlyByHelp start
+	].
+
+	"/ an additional --run <file> argument...
+	(i := Smalltalk commandLineArguments indexOf:'--run') ~~ 0 ifTrue:[
+	    fn := Smalltalk commandLineArguments at:i+1.
+	    ('private.rc [info]: executing "',fn,'"...') infoPrintCR.
+	    Smalltalk fileIn:fn.
 	]
     ].
 ].