Fork me on GitHub
#babashka
<
2022-04-23
>
teodorlu11:04:08

This is amazing! Perhaps it makes sense to get it merged into the Doom Clojure layer?

teodorlu11:04:24

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?

borkdude11:04:48

I defer all elisp/emacs questions to @U0G75ARHC

👍 1
ag00:04:48

> 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.

💯 1
Charles Comstock19:04:17

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"))?

borkdude19:04:00

shell comes from babashka.tasks , a special namespace for tasks

borkdude19:04:25

currently yes, :dir to each shell invocation.

borkdude19:04:25

shell takes the same options as babashka.process/process but defaults to :inherit true and throws on non-zero exit codes

👀 1
Charles Comstock19:04:59

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.

borkdude19:04:36

No problem :)

Charles Comstock19:04:16

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.

borkdude19:04:38

Not yet. I believe there is an issue about that.

Charles Comstock19:04:46

Cool, thank you!

borkdude19:04:23

Hmm, no, can't find the issue, but feel free to create one