Open dundalek opened 5 years ago
Maybe use metadata?
(sh-str git status ^:splice flags > "/dev/null" | tail -n1)
In my opinion the apply version isn't that ugly. Especially since we would use it in scripts only.
Also it can be made slightly less ugly:
(apply sh-str* "git" "status" (concat flags '["/dev/null" | tail -n1]))
This might be uglier then the metadata option, for instance, but it would be easier to understand and reason about when you already have some experience in Clojure.
So that arguments can be spliced instead of using workarounds like this:
After it might become:
Now that I see it.. it looks ugly too. So there may be even some better way.