[#404] fix docstring of clojure.java.shell/sh
This commit is contained in:
parent
67c9a34e7a
commit
41a7987dc8
1 changed files with 10 additions and 4 deletions
|
|
@ -1,10 +1,14 @@
|
||||||
(ns babashka.impl.clojure.java.shell
|
(ns babashka.impl.clojure.java.shell
|
||||||
{:no-doc true}
|
{:no-doc true}
|
||||||
(:require [clojure.java.shell :as shell]
|
(:require [clojure.java.shell :as shell]
|
||||||
[sci.core :as sci]))
|
[sci.core :as sci]
|
||||||
|
[sci.impl.namespaces :refer [copy-var]]
|
||||||
|
[sci.impl.vars :as vars]))
|
||||||
|
|
||||||
(def sh-dir (sci/new-dynamic-var '*sh-dir* nil))
|
(def shell-ns (vars/->SciNamespace 'clojure.java.shell nil))
|
||||||
(def sh-env (sci/new-dynamic-var '*sh-env* nil))
|
|
||||||
|
(def sh-dir (sci/new-dynamic-var '*sh-dir* nil {:ns shell-ns}))
|
||||||
|
(def sh-env (sci/new-dynamic-var '*sh-env* nil {:ns shell-ns}))
|
||||||
|
|
||||||
(defn with-sh-dir*
|
(defn with-sh-dir*
|
||||||
[_ _ dir & forms]
|
[_ _ dir & forms]
|
||||||
|
|
@ -32,6 +36,8 @@
|
||||||
(let [args (parse-args args)]
|
(let [args (parse-args args)]
|
||||||
(apply shell/sh args)))
|
(apply shell/sh args)))
|
||||||
|
|
||||||
|
(alter-meta! #'sh (constantly (meta #'shell/sh)))
|
||||||
|
|
||||||
(def shell-namespace
|
(def shell-namespace
|
||||||
{'*sh-dir* sh-dir
|
{'*sh-dir* sh-dir
|
||||||
'*sh-env* sh-env
|
'*sh-env* sh-env
|
||||||
|
|
@ -39,4 +45,4 @@
|
||||||
{:sci/macro true})
|
{:sci/macro true})
|
||||||
'with-sh-env (with-meta with-sh-env*
|
'with-sh-env (with-meta with-sh-env*
|
||||||
{:sci/macro true})
|
{:sci/macro true})
|
||||||
'sh sh})
|
'sh (copy-var sh shell-ns)})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue