Skip to main content

render_activation

Function render_activation 

Source
pub fn render_activation(shell: ShellKind) -> String
Expand description

Renders the activation script for a shell.

The activation script only sets up the hook plumbing:

  1. VS_SESSION_ID — identifies this shell session.
  2. Hook function definition + registration.
  3. Exit trap for session cleanup.
  4. Initial hook call.

All environment variable management (__VS_ORIG_PATH, PATH, plugin vars, __VS_VARS, __VS_STATE_HASH) is handled by vs __hook-env so that the logic lives in one place.