Documentation
¶
Overview ¶
Package capture demonstrates streaming a subprocess's output into an on-screen pkg/logview with runner.Capture, next to a command picker, with tab cycling focus between the two.
Capture is the counterpart to runner.Run: Run hands the real terminal to a full-screen program and the TUI suspends, while Capture pipes stdout/stderr and the TUI stays live — so the user keeps scrolling, filtering and searching while the command runs (rule 15).
Under the app shell there is no plumbing to write. The shell chains the reads and forwards every message on, so a screen that wants the output in place just matches the three messages a capture emits: CaptureStarted, one CapturedLine per line, then one Captured. The same stream is feeding the app-wide console at the same time — press o and the run is all there, with its exit status, after this screen has scrolled it away.
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- 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(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 forwards to the Group — which names both panes and their groups — and adds this screen's own verbs, the kill key appearing only while something is running.