Add a section to docs/site/concepts/profiles.md explaining:
onInit and postAttach steps are typed into the shell stdin, not exec'd as subprocesses
- Env key/value pairs are prefixed inline (
FOO="bar" script), not exported
- Foreground vs background behavior — if
onInit launches a long-lived process, terminal state transitions to Ready immediately after writing the line
- Caveats: multi-line scripts, here-docs, env scoping
Why: Users currently expect shell-level semantics (env exported to parent shell, script completes before prompt). The real behavior is in internal/terminal/terminalrunner/lifecycle.go:259-282 but undocumented.
From gap-analysis.md §7 (P2).
Add a section to
docs/site/concepts/profiles.mdexplaining:onInitandpostAttachsteps are typed into the shell stdin, not exec'd as subprocessesFOO="bar" script), not exportedonInitlaunches a long-lived process, terminal state transitions toReadyimmediately after writing the lineWhy: Users currently expect shell-level semantics (env exported to parent shell, script completes before prompt). The real behavior is in
internal/terminal/terminalrunner/lifecycle.go:259-282but undocumented.From gap-analysis.md §7 (P2).