Stream: Miscellaneous

Topic: opam switch tight to a directory?

view this post on Zulip Bas Spitters (Aug 27 2021 at 11:30):

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?

view this post on Zulip Paolo Giarrusso (Aug 27 2021 at 13:58):

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.

view this post on Zulip Clément Pit-Claudel (Aug 29 2021 at 03:39):

It also works to create the link by hand: ln -s ~/.opam/xyz _opam

Last updated: Jun 13 2024 at 05:01 UTC