processes

package
v0.46.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

New returns the processes screen.

Types

type Screen

type Screen struct {
	// contains filtered or unexported fields
}

func (*Screen) Actions

func (s *Screen) Actions() action.Set

Actions satisfies action.Provider: what can be done to the output.

func (*Screen) Help

func (s *Screen) Help() []key.Binding

func (*Screen) HelpSections

func (s *Screen) HelpSections() []help.Section

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

func (s *Screen) Init() tea.Cmd

func (*Screen) IsCapturingKeys

func (s *Screen) IsCapturingKeys() bool

func (*Screen) Layout

func (s *Screen) Layout() layout.Node

func (*Screen) OnEnter

func (s *Screen) OnEnter(result any) tea.Cmd

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.

func (*Screen) SetTheme

func (s *Screen) SetTheme(t theme.Theme)

func (*Screen) Title

func (s *Screen) Title() string

func (*Screen) Update

func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL