pager

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 13 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 */
	HelpStyle       style.Styles `embed:"" prefix:"help." help:"Style the help text" set:"defaultForeground=241" envprefix:"GUM_PAGER_HELP_"`
	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:"false"`
	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:"0" env:"GUM_PAGER_TIMEOUT"`
}

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