pub fn integration_base_for(data_dir: &Path, home_dir: &Path) -> PathBufExpand description
Deploy shell integration scripts into <shell_root>/<type>/.
Skips deployment if the version marker is already current.
Errors are logged but not fatal — a missing script just means no integration.
Root under which this instance’s shell-integration scripts are deployed.
Deliberately under the user’s home rather than the instance data dir:
MSIX virtualises writes to %LocalAppData%, so scripts written there are
invisible to the ConPTY-spawned children that must source them, while ~
is never virtualised (see shell/lifecycle.rs’s spawn path).
Keyed per instance, because the home dir is otherwise machine-global and
every instance of every version writes these same files — on every shell
spawn, not just at boot. Two concurrently-running versions therefore
rewrite each other’s scripts indefinitely, and a shell can source an
rcfile another instance is mid-replacement of. That is invariant I6
(instances of different (channel, version) never share a directory),
and the key mirrors I5’s dir_hash treatment of named OS objects.
The data dir is the right key: it is <channel>/versions/<version>/data
by construction, so it already distinguishes exactly the pairs I6 names.