I would like to read the output of a shell command.
The shell command I want to read must be run from a specific location. (it’s git log).
Is there a nice way to do this other than cding into the location, running (clojure.java.shell/sh "git log"), and then cding back to the working directory?
I’m looking for some sort of (shell-at directory command) function. A simple implementation of this function would also be appreciated. My experience with Clojure is minimal.
clojure.java.shell/shsupports a:diroption to set the working directory of the sub-process:See here.