Expand description
Shell activation.
Two mechanisms (both offered, like mise):
- Shims (default): the shims dir on PATH; robust in IDEs/CI. Set up by
osdkitself when tools are installed. - Shell activation (
osdk activate <shell>): injects a hook that runsosdk hook-envon each prompt / dir change, putting a project’s installed commands before global shims and active versions’ real bin dirs, and exporting their env (GOROOT/JAVA_HOME/…).
This module renders the per-shell snippets and computes the env delta.
Structs§
- EnvDelta
- The env changes to apply for the active toolset in
cwd.
Enums§
Functions§
- activation_
script - Render the shell-integration snippet for
osdk activate <shell>. The snippet wires a prompt/dir-change hook that evalsosdk hook-env. - canonical_
project_ npm_ specs - Reconstruct canonical npm backend specs from project tool entries without letting raw-key ordering decide which of two aliases wins.
- compute_
env_ delta - Compute the env delta for the directory
cwd: for each backend with an active + installed version, collect its bin dirs and exec env. Invalid dynamic-tool inventory aborts activation instead of producing a partial environment that could route around the configured tool. - deactivation_
script - Render shell code that removes osdk’s hook and restores the environment
captured by
render_hook_env. - render_
hook_ env - Render
hook-envoutput: shell commands that prepend PATH and set vars.