zsh

package
v0.17.21 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllowedCommands

func GetAllowedCommands() []string

GetAllowedCommands returns a list of all allowed commands (for documentation/config)

func GetBlockedCommands

func GetBlockedCommands() []string

GetBlockedCommands returns a list of all blocked commands (for documentation/config)

Types

type CommandInfo

type CommandInfo struct {
	Name       string      // Command name
	Type       CommandType // external, builtin, alias, function
	Path       string      // For external commands, the full path
	Value      string      // For aliases, the expanded value
	SubCommand string      // For commands with subcommands, the detected subcommand
}

CommandInfo contains information about a detected command

func IsCommand

func IsCommand(input string) (bool, *CommandInfo, error)

IsCommand checks if the given input starts with a valid zsh command that is safe for auto-execution in the sprout context. Returns (isCommand, commandInfo, error).

type CommandType

type CommandType string

CommandType represents the type of zsh command

const (
	CommandTypeExternal CommandType = "external"
	CommandTypeBuiltin  CommandType = "builtin"
	CommandTypeAlias    CommandType = "alias"
	CommandTypeFunction CommandType = "function"
)

Jump to

Keyboard shortcuts

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