Fork me on GitHub
#babashka
<
2023-10-27
>
pmros08:10:31

I cant remember a cli tool for passing shell output to clojurescript code (something like nbb). Can you help me?

borkdude08:10:16

can you be more specific?

pmros08:10:14

@U04V15CAJ I can't because can't remember. But you can do something like this: ls | clojurescript '<your clojurescript code>'. Very nice.

borkdude08:10:10

so your question is how to read from standard in in ClojureScript?

pmros08:10:00

@U04V15CAJ My question is what is that project name.

borkdude08:10:49

well #C029PTWD3HR can execute ClojureScript code, like npx nbb -e '(+ 1 2 3)' but if you can't be more specific it's hard to say if you are asking for that, sorry

borkdude08:10:45

In bb (babashka) it's easier to read from stdin but this is Clojure, not ClojureScript

pmros08:10:30

@U04V15CAJ I can't be more specific. Thank you.

borkdude08:10:20

$ ls | bb -i '*input*'
("10" "Applications" "Applications (Parallels)" "Desktop" ...)

1
🙌 1
👍 1
❤️ 1
🧠 1
pmros08:10:16

@U04V15CAJ That is! Thank you! ls | bb -i '(filter fs/directory? input)'

pmros08:10:39

@U04V15CAJ Sorry. I'm a poor newbie.

borkdude09:10:52

oh I see, "ClojureScript" threw me off, since this usually means Clojure on a JavaScript platform. No worries :)