console

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 20 Imported by: 0 modules, 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 console is dockhand console: the branches in a table the terminal's size, kept current as serve works, a pane of the journal's events or a branch's detail under it, and keys that run logs, check, tidy, and submit on the row selected.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(s *settings.Settings, streams term.Streams) *cobra.Command

func Frame

func Frame(m Model) []screen.Line

Frame is the model drawn as the screen's lines, exactly its height.

Types

type Model

type Model struct {
	At time.Time
	// Rows are the branches in bucket order (Gathered); All is --all, the
	// merged, closed, and archived among them.
	Rows []view.Row
	All  bool
	// Serve is serve's state as status says it.
	Serve string
	// Problem is why the last gather failed, the rows the last that
	// didn't.
	Problem string
	// Events are the journal's events as lines, newest last.
	Events []string
	// Detail is the selected branch's detail, for the pane that shows it.
	Detail        []string
	Width, Height int
	Selected      model.BranchID
	Pane          pane
}

Model is everything a frame shows, with no terminal: the branches' rows, the pane's events or detail, the screen's size, and the row selected, kept by its branch across gathers. Frame draws it, so every decision of the layout is a test of text.

func (*Model) Gathered

func (m *Model) Gathered(rows []view.Row)

Gathered takes the rows a gather found, in bucket order, the done ones only with All, keeping the selected row by its branch; where that's gone, the row now where it was.

func (*Model) Heard

func (m *Model) Heard(lines ...string)

Heard adds events' lines to the pane's, keeping the newest.

func (*Model) Move

func (m *Model) Move(key screen.Key) bool

Move moves the selection as a key asks: a row, a page, or to the first or last; it reports whether the selection moved.

func (Model) Row

func (m Model) Row() (view.Row, bool)

Row is the selected row, where there is one.

Jump to

Keyboard shortcuts

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