pager

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 15 Imported by: 2

Documentation

Overview

Package pager provides a pager (similar to less) for the terminal.

$ cat file.txt | gum pager

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	//nolint:staticcheck
	Style           style.Styles `` /* 141-byte string literal not displayed */
	Content         string       `arg:"" optional:"" help:"Display content to scroll"`
	ShowLineNumbers bool         `help:"Show line numbers" default:"true"`
	LineNumberStyle style.Styles `embed:"" prefix:"line-number." help:"Style the line numbers" set:"defaultForeground=237" envprefix:"GUM_PAGER_LINE_NUMBER_"`
	SoftWrap        bool         `help:"Soft wrap lines" default:"true" negatable:""`
	MatchStyle      style.Styles `` //nolint:staticcheck
	/* 134-byte string literal not displayed */
	MatchHighlightStyle style.Styles `` //nolint:staticcheck
	/* 187-byte string literal not displayed */
	Timeout time.Duration `help:"Timeout until command exits" default:"0s" env:"GUM_PAGER_TIMEOUT"`

	// Deprecated: this has no effect anymore.
	HelpStyle style.Styles `embed:"" prefix:"help." help:"Style the help text" set:"defaultForeground=241" envprefix:"GUM_PAGER_HELP_" hidden:""`
}

Options are the options for the pager.

func (Options) Run

func (o Options) Run() error

Run provides a shell script interface for the viewport bubble. https://github.com/charmbracelet/bubbles/viewport

Jump to

Keyboard shortcuts

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