Expand description
Shell integration injection for the integrated terminal.
When LAND_SHELL_INTEGRATION is not explicitly set to "0", this module
finds the appropriate shell integration script (bash, zsh, or fish) in the
app resource directory and injects it into the shell’s startup sequence
so the workbench receives OSC 633 command-tracking sequences.
§OSC 633 sequence meanings
| Code | Meaning |
|---|---|
| A | Prompt start |
| B | Prompt end |
| C | Command start |
| D;N | Command end (exit N) |
| P;cwd= | Current working directory |
§Injection strategy per shell
- bash:
--init-file <script>- replaces.bashrc; script sources the original before setting hooks. - zsh: set
ZDOTDIRto a temp dir whose.zshrcsources the script thenLAND_ORIG_ZDOTDIR/.zshrc; avoids touching--rcs. - fish:
--init-command 'source <script>' - All others: no injection; integration unavailable for that shell.
Structs§
- Injection
- Describes how a shell integration script should be injected.
Functions§
- Compute
- Computes the
Injectionforshell_path, orNoneif the shell is unsupported or integration is explicitly disabled viaLAND_SHELL_INTEGRATION=0. - Script
Path 🔒 - Returns the resource-dir path for a named integration script.
- Shell
Name 🔒 - Returns the shell binary name (lowercase) extracted from a full path.