help

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Context string // context the binding is valid in
	Key     string // which key
	Help    string // what the key does
}

Binding describes a keybinding.

type HelpModel

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

HelpModel is the HelpModel for help. The help screen shows keybindings.

func InitialModel

func InitialModel(name string, contexts []string, bindings []Binding) HelpModel

InitialModel builds the model.

func (HelpModel) HelpMode

func (m HelpModel) HelpMode() bool

HelpMode returns true if the hlep mode is active.

func (*HelpModel) HideHelp

func (m *HelpModel) HideHelp()

func (HelpModel) Init

func (m HelpModel) Init() tea.Cmd

Init initializes the model.

func (*HelpModel) ShowHelp

func (m *HelpModel) ShowHelp()

func (HelpModel) Update

func (m HelpModel) Update(msg tea.Msg) (HelpModel, tea.Cmd)

Update handles a message.

func (HelpModel) View

func (m HelpModel) View() string

View renders the model.

Jump to

Keyboard shortcuts

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