Skip to main content

shim_function_env

Function shim_function_env 

Source
pub fn shim_function_env(home: &Path, off: bool) -> Vec<(String, String)>
Expand description

Environment variables that make a bash started with them define cargo, task, npm, npx and docker as functions calling the shims under home (BASH_FUNC_cargo%% and so on: bash imports an exported function from its environment).

A function wins over any PATH lookup, so the shim is reached whatever order a shell profile left the PATH in. On Windows, Git Bash’s profile puts ~/bin first, and a cargo.exe there (a rustup proxy) made every agent’s cargo skip the slot: five srv compiles ran at once (2026-10-25). The shims put their own directory back first for the tools they run, which covers what those start (task -> cargo).

Nothing for a tool whose shim is not installed (or is somebody’s own), nor when the slot is switched off (off, from AGENTMUX_BUILD_SLOT_OFF).