How to stack a new environment over the present one?

For example, in this sequence:

(@v1.8) pkg> activate a
  Activating new project at `~/a`

julia> Base.load_path()
4-element Vector{String}:
 "/home/jishnu/a/Project.toml"
 "/tmp/jl_wT5lem"
 "/home/jishnu/.julia/environments/v1.8/Project.toml"
 "/home/jishnu/packages/julias/julia-1.8/share/julia/stdlib/v1.8"

(a) pkg> activate b
  Activating new project at `~/b`

julia> Base.load_path()
4-element Vector{String}:
 "/home/jishnu/b/Project.toml"
 "/tmp/jl_wT5lem"
 "/home/jishnu/.julia/environments/v1.8/Project.toml"
 "/home/jishnu/packages/julias/julia-1.8/share/julia/stdlib/v1.8"

How do I add both a and b to the load path, other than explicitly modifying LOAD_PATH?

This is how you do it.

1 Like