     (loop [lines lines
            idx (inc (.indexOf lines dir))
            to (to-fun lines)
-           output nil]
+           output nil
+           continuation false]
       (if (= idx to)
         (let [sublines (drop (inc idx) lines)]
           (if (> (.indexOf sublines dir) -1)
             (recur sublines
                    (inc (.indexOf sublines dir))
                    (to-fun sublines)
-                   output)
+                   (str output delimiter)
+                   false)
             output))
         (let [ln (nth lines idx)]
           (recur lines
                  (inc idx)
                  to
-                 (str output (if output
+                 (str output (if continuation
                                (str "\n" ln)
-                               ln))))))))
+                               ln))
+                 true))))))
 
 
 (defn add-ctool-to-genv
-  [ret out & [err]]
+  [ret & [out err delimiter]]
   (let [output (-> ret :stdout)]
     (when err
       (swap! genv
         #(assoc % (name err)
-                (parse-ctool-run-output output :err))))
+                (parse-ctool-run-output output :err delimiter))))
     (when out
       (swap! genv
         #(assoc % (name out)
-                (parse-ctool-run-output output :out))))
+                (parse-ctool-run-output output :out delimiter))))
 
     @(:exit-code ret)))
 

      (add-ctool-to-genv
        ret
        (:out bundle)
        (:err bundle)))))


(defn ctool-run-scripts



(defn parse-ctool-run-output
  [input file & [delimiter]]
  (let [lines (clojure.string/split input #"\n")
        dir (condp = file :out "Out: " :err "Err: ")
        to-fun (fn [lines]
