command

package
v0.7.0-nightly Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(root *cobra.Command, args []string, out io.Writer) error

Execute executes the root command. It requires the input and output sources, as otherwise it'll try to read the STDIN and STDOUT streams. The "args" value contains a complete command expression split into a slice of strings, and the "out" represents io.Writer instance for writing the command execution result.

func NewHelpCmd added in v0.6.0

func NewHelpCmd() *cobra.Command

func NewRootCmd added in v0.6.0

func NewRootCmd() *cobra.Command

func ViewHelp added in v0.6.0

func ViewHelp(cmd *cobra.Command) string

Types

type History added in v0.6.0

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

func NewHistory added in v0.6.0

func NewHistory(capacity int) *History

func (*History) Clear added in v0.6.0

func (h *History) Clear()

func (*History) Next added in v0.6.0

func (h *History) Next() (string, bool)

func (*History) Prev added in v0.6.0

func (h *History) Prev() (string, bool)

func (*History) Push added in v0.6.0

func (h *History) Push(entry string)

func (*History) ResetCursor added in v0.6.0

func (h *History) ResetCursor()

func (*History) SetCursor added in v0.6.0

func (h *History) SetCursor(cursor int)

func (*History) Size added in v0.6.0

func (h *History) Size() int

type Model

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

func NewModel

func NewModel(onStateChange func()) *Model

func (*Model) Enable

func (m *Model) Enable()

func (*Model) Enabled

func (m *Model) Enabled() bool

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) SetPathContext

func (m *Model) SetPathContext(path string, entries []string)

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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