exec

package
v0.0.0-...-56f1d57 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Exec       = execCmd
	ExecSilent = execSilentCmd
)

Functions

func HasZsh

func HasZsh() bool

HasZsh returns true if ZSH is installed and accessible through $PATH

Types

type BmxExecError

type BmxExecError struct {
	Command        string
	Stdout, Stderr string
	// contains filtered or unexported fields
}

func (*BmxExecError) Error

func (t *BmxExecError) Error() string

func (*BmxExecError) SetError

func (t *BmxExecError) SetError(err error)

func (*BmxExecError) StyledError

func (t *BmxExecError) StyledError(w int) string

type Completion

type Completion struct {
	Option      string
	Description string
}

Completion represents a completion object

func ZshCompletions

func ZshCompletions(in string) (out []Completion, err error)

ZshCompletions matches completions based on the `in` string.

This triggers the completion script and captures the completions given by the ZSH subshell environment, returning a slice of Completion objects which contain the completion option and an optional description if one is provided for that option.

type ExecTimeoutError

type ExecTimeoutError struct{}

ExecTimeoutError is returned when the completion takes longer than the anticipated execution time of `maxDuration`

Errors of this type would normally be transient as the completion system generally returns long before the deadline is reached.

func (ExecTimeoutError) Error

func (e ExecTimeoutError) Error() string

type MissingZshError

type MissingZshError struct{}

MissingZshError is returned when Zsh is not found in the users environment

Applications implementing this package can use this todisable the completion system

func (MissingZshError) Error

func (e MissingZshError) Error() string

Jump to

Keyboard shortcuts

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