screen

package
v1.14.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: 10 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 screen prints command output the way the forms show: as tall as the terminal.

Index

Constants

This section is empty.

Variables

View Source
var ErrQuit = errors.New("user quit")

ErrQuit is returned when the user quits everything (ctrl+q), not just this view (esc): a caller showing it from another screen stops too; cmd.Execute keeps it silent.

Functions

func Footer(hints ...Hint) string

Footer renders shortcuts like the forms' help line: accent key glyph, muted label, subtle " · " between. Every screen and form starts with the keys found almost everywhere, always in the same place: ⎋ Back, ^E Edit, then ↳ or ^↳; the screen's own keys follow, ^Q Quit last.

func Print

func Print(output string)

Print writes output, padded with blank lines to the terminal height; a pipe or file gets it as is.

func PrintJSON

func PrintJSON[T any](items []T)

PrintJSON writes a list for scripts: an empty one is [], not null.

func Show

func Show(output string) (bool, error)

Show displays output as tall as the terminal, scrollable, until the user leaves it. It reports true when the user asked to edit the item (ctrl+e), ErrQuit on ctrl+q; a pipe or file just gets the output.

Types

type Hint

type Hint struct {
	Key   plumtypes.Key
	Label string
}

Hint is one shortcut of a footer line.

Jump to

Keyboard shortcuts

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