uiutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package uiutil provides utility functions for UI message handling. TODO: Move to internal/ui/<appropriate_location> once the new UI migration is finalized.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdHandler

func CmdHandler(msg tea.Msg) tea.Cmd

func ExecShell

func ExecShell(ctx context.Context, cmdStr string, callback tea.ExecCallback) tea.Cmd

ExecShell parses a shell command string and executes it with exec.Command. Uses shell.Fields for proper handling of shell syntax like quotes and arguments while preserving TTY handling for terminal editors.

func ReportError

func ReportError(err error) tea.Cmd

func ReportInfo

func ReportInfo(info string) tea.Cmd

func ReportWarn

func ReportWarn(warn string) tea.Cmd

Types

type ClearStatusMsg

type ClearStatusMsg struct{}

type Cursor

type Cursor interface {
	Cursor() *tea.Cursor
}

type InfoMsg

type InfoMsg struct {
	Type InfoType
	Msg  string
	TTL  time.Duration
}

type InfoType

type InfoType int
const (
	InfoTypeInfo InfoType = iota
	InfoTypeSuccess
	InfoTypeWarn
	InfoTypeError
	InfoTypeUpdate
)

Jump to

Keyboard shortcuts

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