I think there is some inconsistencies within the opam documentation.
For example in https://opam.ocaml.org/doc/Usage.html#opam-switch:
Don’t forget to run the advertised
eval $(opam env)
to update your PATH accordingly.
For a newcomer, this is uselessly painful and time consuming because he has a lot to learn nearly from scratch.
This is no more a problem for me but I had to struggle with this tool because of the official instructions (opam.ocaml.org or ocaml.org) or because of some blog posts mixing things up (using opam 1.2 vs. opam 2 commands without giving the references, etc.).
I just checked (opam 2.0.2) : I do not need to execute the command eval $(opam env)
: the path is automatically updated.
BTW, is it the normal, expected behavior?
About the opam init
command.
I do use it, because I’m forced to. But, even if this command is rarely executed, is there an interest to do it instead of integrating within in the opam installation?