babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Jakub Zika 2021-05-19T05:56:20.044100Z

Works... babashka is really cool. Thanks

borkdude 2021-05-19T06:17:03.045300Z

Please include more details. What error do you see, etc. Perhaps it’s just a missing function.

borkdude 2021-05-19T13:51:48.055900Z

Cool script to display ns tree: https://github.com/cldwalker/bb-clis#bb-ns-dep-tree

1
2
grazfather 2021-05-19T15:04:06.056400Z

that whole repo is nice

Max 2021-05-19T17:52:16.058400Z

Is there a way to get the name the script was executed with? It’s usually the first argument, but it appears babashka strips it off. For example:

bb -e true => bb
./my-script.bb 1 2 3 => ./my-script.bb 

borkdude 2021-05-19T17:54:23.059400Z

@max.r.rothman the file being executed is available in (System/getProperty "babashka.file")

Max 2021-05-19T17:57:18.060Z

That gets the file, but it doesn’t tell you how the script was executed. For example, if the script has a shebang and is in your path, it still shows the full path to the file

borkdude 2021-05-19T17:57:59.060200Z

it has the absolute path yes, like *file*

borkdude 2021-05-19T17:59:03.060400Z

This is by design, so you can do: (= *file* (System/getProperty "babashka.file")) to know if the current file is what the user invoked

borkdude 2021-05-19T18:00:06.060800Z

If your question is: how do I get a filename from an absolute path, you can use babashka.fs/file-name