I am a Mac user. Let’s say I have a package under development,
Foo.jl, that is present under the folder
~/github/Foo.jl on my machine (here the tilde is the home directory, standard for Macs). I am writing another script elsewhere, say under
~/scripts/script.jl that needs to include the package
To make sure I don’t get an error when trying
using Foo, I would like to activate the environment for the package, which I would normally do with
] activate . while in the highest level of the package. I know that you can specify a path to activate environments other than the standard Julia one and whichever folder you are currently in, but running
] activate "~/github/Foo.jl" creates a new environment inside of
~/scripts/~/github/Foo.jl, which is obviously not my intention.
Is there a way to express that I am giving the absolute path of the directory, i.e., to recognize that the
~ character means “home directory”?
I know, of course, that I can do a series of
../../.. for as long as it takes to get back to
~, but I’m sure it’s understandable that this can become cumbersome the farther I am from
~. I could also do
; cd ~/github/Foo.jl and then
] activate ., but I am hoping there is something a little nicer than that.
Thanks in advance!