This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-23
Channels
- # babashka (18)
- # babashka-sci-dev (42)
- # beginners (84)
- # calva (11)
- # cider (5)
- # clj-kondo (11)
- # cljdoc (70)
- # cljs-dev (34)
- # clojure-europe (1)
- # clojurescript (3)
- # conjure (1)
- # core-async (29)
- # data-oriented-programming (10)
- # emacs (13)
- # fulcro (8)
- # gratitude (2)
- # honeysql (1)
- # introduce-yourself (4)
- # kaocha (10)
- # missionary (8)
- # nrepl (4)
- # off-topic (27)
- # portal (32)
- # releases (11)
- # tools-deps (11)
- # xtdb (19)
cool bit of elisp <-> babashka interaction: https://twitter.com/borkdude/status/1517810425689219072
This is amazing! Perhaps it makes sense to get it merged into the Doom Clojure layer?
Also, if you'll excuse my lack of elisp-fu, is this using the selected completion framework? So if I use vertico, it uses vertico, if I use ivy, it uses ivy?
Cross posted to #doom-emacs: https://clojurians.slack.com/archives/C01GE5PD249/p1650715030966379
> So if I use vertico, it uses vertico, if I use ivy, it uses ivy?
It should work in any completion framework. Vertico works by advising (completing-read-default)
. Ivy works around setting up completing-read-function
, both of them get used by (completing-read)
, and that's what's used in neil.el.
Couple quick questions that aren't clear from the babashka book. One is "shell" appears to be automatically available as a refer in bb.edn
tasks but it's not clear if that is the shell from babashka.process
, clojure.java.shell
, or something else? I've tried searching through the book a couple of times and but haven't been able to find anything clarifying what the explict require is there for use in a script task. Second question is about executing a sequence of commands within a subdir. Would the recommended idiom be to pass a :dir
value to each shell invocation like (shell {:out "subdir") "git init") (shell {:out "subdir"} "git add files")
, or is there something like (within-directory "subdir" (shell "git init") (shell "git add files"))
?
shell
takes the same options as babashka.process/process
but defaults to :inherit true
and throws on non-zero exit codes
Gotcha, thanks! Now that I know the right thing to look for I see it is documented @ https://book.babashka.org/#_tasks_api, not sure how I missed that.
One other question about the shell, are there any nice debug wrappers ala bash -x explain to show invocation cmd and output by default? I can make something, just curious if there is any prior art.
Cool, thank you!