Documentation
¶
Overview ¶
Package processes is the subprocess showcase: running commands, streaming their output, handing the terminal over, and the app-wide console that keeps everything said — on one screen, so a change that breaks an older feature shows up where you can see it.
┌ commands ───────────┐┌ output ─────────────────────────────────┐ │ grouped menu: ││ a searchable, capped logview: what a │ │ capture / terminal ││ capture streams, and the synthetic tail │ │ / console ││ │ ├ about ──────────────┤│ │ │ the highlighted one ││ │ └─────────────────────┘└──────────────────────────────────────────┘
What it exercises:
- runner.Capture (rule 15): the TUI stays live while a command streams. Under the shell there is no plumbing: the screen matches the three messages a capture emits — CaptureStarted, one CapturedLine per line, Captured — and the shell chains the reads. The same stream feeds the console (o) at the same time, with the exit status. Kill is on the action menu (a) while a capture runs.
- runner.Run and RunWithNotice (rule 11): the terminal handed to an editor, a pager or a full-screen TUI, the result shown on return.
- The console (rule 14): app.Info / Error, ErrorDetail's body and ErrorOf's %w chain, all kept after the statusbar wipes them.
- A logview following a stream (rules 13, 18): search, n / N, G to follow, a cap on what is kept.
- OnEnter's OutputClosed guard: closing the console pops back here, and the activation count in the about pane must not move when it does.
- pkg/menu inside a focus.Group: tab cycles panes, [ / ] jump the menu's groups, enter or a double click runs the highlighted command.
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- func (s *Screen) Actions() action.Set
- func (s *Screen) Help() []key.Binding
- func (s *Screen) HelpSections() []help.Section
- func (s *Screen) Init() tea.Cmd
- func (s *Screen) IsCapturingKeys() bool
- func (s *Screen) Layout() layout.Node
- func (s *Screen) OnEnter(result any) tea.Cmd
- func (s *Screen) SetTheme(t theme.Theme)
- func (s *Screen) Title() string
- func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func (*Screen) HelpSections ¶
HelpSections is the Group's. It carries no "o": the shell advertises the output key itself, so a screen restating it would show it twice.
func (*Screen) IsCapturingKeys ¶
func (*Screen) OnEnter ¶
OnEnter guards against the console. A pop hands OnEnter a result, and nothing but the result tells "I was just pushed" from "someone glanced at the log". A screen that fetches on activation needs this branch, or opening the console silently refetches whatever was underneath.