Skip to content

Docs - Document onInit / postAttach semantics (typed into PTY, not exec'd) #112

Description

@eminwux

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpriority:BPriority Should-Have

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions