Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public current-file and current-file-parent #129

Open
tomconnors opened this issue Jul 13, 2021 · 2 comments
Open

Public current-file and current-file-parent #129

tomconnors opened this issue Jul 13, 2021 · 2 comments

Comments

@tomconnors
Copy link
Contributor

The functions in spire.utils current-file and current-file-parent would be useful in userland - I'd like to be able to slurp files using their relative path from the script. Is there currently some other way to do this?

@retrogradeorbit
Copy link
Member

retrogradeorbit commented Aug 9, 2021

They should be available in your scripts:

crispin@vash:~$ cat test-current-file.clj 
(ns test-current-file
  (:require [spire.utils :as utils]))

(utils/current-file)

then

crispin@vash:~$ spire test-current-file.clj 
"test-current-file.clj"

The function is bound here, in case you are wondering: https://github.com/epiccastle/spire/blob/master/src/clj/spire/namespaces.clj#L203

@tomconnors
Copy link
Contributor Author

Got it, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants