The is an option to pin an opam switch to a specific directory. However, I cannot find it anymore.
Does anyone know what I'm looking for?
Oh I might remember! I think you're looking for
opam switch link:
$ opam switch --help ... link SWITCH [DIR] Sets a local alias for a given switch, so that the switch gets automatically selected whenever in that directory or a descendant.
It also works to create the link by hand:
ln -s ~/.opam/xyz _opam
Last updated: Dec 05 2023 at 12:01 UTC