Skip to content

Commit

Permalink
Merge pull request #5627 from kit-ty-kate/plugin-doc
Browse files Browse the repository at this point in the history
Add an explanation of how plugins work to the manual
  • Loading branch information
rjbou authored Feb 5, 2025
2 parents d2f2e6b + b11c530 commit 4082943
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/pages/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ Switches are laid out thusly:
- `<switch-prefix>/.opam-switch/backup`: snapshots of previous states of the
switch, and other backup files.

#### Plugins

Opam has a plugin mechanism. It works via opam packages whose name starts by
`opam-` and that have the flag [`plugin`](#opamflag-plugin). They are
installed in the current switch but can be used accross switches via
their dedicated `opam insert-plugin-name-here` subcommand.

Internally, when opam doesn't know a subcommand name (e.g. `opam plugin-name`),
it looks at the binaries located in `${OPAMROOT}/plugins/bin`
(by default: `~/.opam/plugins/bin`). Everytime a plugin package is installed,
its `opam-insert-plugin-name-here` binary gets symlinked in that directory.
If no binaries with a matching name are found, a warning will be shown.

#### Pinning

Pinning is an operation by which a package definition can be created or altered
Expand Down
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ users)
* Add winget command for installing opam [#6338 @tobil4sk]
* Fix broken link to non-existing archlinux community repo [#6361 @juergenhoetzel]
* Document the meaning of colored version numbers in the manpage of `opam show` [#6358 @kit-ty-kate]
* Add an explanation of how plugins work to the manual [#5627 @kit-ty-kate]

## Security fixes

Expand Down

0 comments on commit 4082943

Please sign in to comment.