tree

package
v0.0.0-...-7a3fd9b Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractVariables

func ExtractVariables(command string) []string

ExtractVariables extracts unique variable placeholders from command string Supports {variable} format and returns deduplicated list

func ReplaceVariables

func ReplaceVariables(command string, values map[string]string) string

ReplaceVariables substitutes variable placeholders with provided values

func RunCommandInTerminal

func RunCommandInTerminal(command string) tea.Cmd

RunCommandInTerminal executes command in terminal with user prompt to continue

Types

type CommandFinishedMsg

type CommandFinishedMsg struct{}

CommandFinishedMsg signals completion of command execution

type TreeNode

type TreeNode struct {
	Name        string
	Children    []*TreeNode
	Expanded    bool
	IsFolder    bool
	Level       int
	Command     string
	Description string
	Confirm     bool
	Variables   []config.VariableConfig
}

TreeNode represents a hierarchical command structure

func BuildTreeFromConfig

func BuildTreeFromConfig(cfg *config.Config) *TreeNode

BuildTreeFromConfig creates tree structure from new config format

func ConvertConfigToTree

func ConvertConfigToTree(cfg *config.ConfigNode, defaultConfirm bool, globalVariables []config.VariableConfig) *TreeNode

ConvertConfigToTree converts configuration to tree structure

Jump to

Keyboard shortcuts

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