                            arg)) args))
 
 (defn- run-class-args
-  "Given command line arguments, extract :run ClassName.
-  Returns a pair of ClassName (or nil) and the args without :run."
+  "Given command line arguments, extract keyword arg and ClassName.
+  Returns a vector of the keyword arg (or nil), the ClassName (or nil), the args
+  before the keyword arg, and the args after the ClassName."
   [args]
-  (let [[before run-etc] (split-with (partial not= ":run") args)]
-    (if (seq run-etc)
-      [(second run-etc) before (rest (rest run-etc))]
-      [nil args nil])))
+  (let [[before & [kw arg & run-args]] (split-with (fn [arg] (not= \: (first arg))) args)]
+    (if (and kw arg (seq run-args))
+      [(keyword (subs kw 1)) arg before run-args]
+      [nil nil args nil])))
 
 (defn- run-main-form
   "Build a form that can run the main method of the given class."

                      (subprocess-compiler-form fregec-args)))
      (when class-name
        (eval/eval-in (project/merge-profiles project [subprocess-profile])
                      (run-main-form class-name (vec run-args)))))))

To display the Frege compiler's help, use: lein fregec :help"
  [project & args]
  (binding [*out* *err*]
    (let [[op class-name args run-args] (run-class-args args)
          project (merge {:frege-source-paths ["."]} project)
          srcs  (:frege-source-paths project)
          out   (:compile-path project)
