Fork me on GitHub
Drew Verlee04:02:26

I have a bb.edn file {:paths ["scripts"]} and my scripts/core.clj file (shell {:extra-env {"FOO" "BAR"}} "printenv FOO") i successfully used emacs to start a babashka repl and can eval expressions. where does the "shell" command come from? I get an error that could not resolve symbol: shell when i try to eval that expression.


It is in babashka.tasks

👀 1
Drew Verlee19:02:21

Is there a way to get the same dedicated window showing a log of the process? Like if i run (shell "node" "main.js") i assume it will correctly execute the process, but i won't have a terminal window that i can print output to or see any log info. Is there any easy way to get this back? Not really a big deal, maybe it just means this isn't a good fit for long running processes?


I don't get your question. (shell "node" "main.js") will do the same as if you launched it from bash basically.


If you want this to appear in a dedicated window, then execute the task from a dedicated window


you could of course use tee or so to split the output to both the terminal and a file and then tail the file in another window

Drew Verlee19:02:48

In the context where i evaluate the expression while communicating with a nrepl server, then it doesn't give me a way to see the output. Overall isn't an issue, i can execute it like a bash script and then it will likely work. I was just trying to figure out the limits. Ill look into using "tee"


Also, most terminals I've used (gnome-terminal, alacritty) can take CLI arguments for a process to start. Then you'd get a new (separate) window.