Trying to launch shell from settings of Light Table IDE.
----------
(defn get-folder [path]
(reduce #(str %1 "/" %2) (butlast (.split path "\\"))))
(require '(clojure.java shell))
(defn exec-shell [file & commands]
(println (:out (clojure.java.shell/sh "cmd" "/c" (str "cd " (get-folder
file)) (reduce #(str %1 " & " %2) "" commands)))))
(cmd/command {:command :user.say-hello
:desc "User: Lein Deps"
:exec (fn []
(let [ed (lt.objs.editor.pool/last-active)]
(exec-shell (-> @ed :info :path) "echo 1")))})
----------
But it seems that I can't use java or clojure libs here. How can I execute a
command with clojurescript?
Maybe there's a way to launch cmd.exe via full path?
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.