shellstate

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompletionSpecDefaultKey = "__default__"
	CompletionSpecEmptyKey   = "__empty__"
)

Variables

This section is empty.

Functions

func ProcessGroupFromContext added in v0.0.23

func ProcessGroupFromContext(ctx context.Context) (int, bool)

func WithCompletionState

func WithCompletionState(ctx context.Context, state *CompletionState) context.Context

func WithProcessGroup added in v0.0.23

func WithProcessGroup(ctx context.Context, pgrp int) context.Context

func WithShellVarAssignments added in v0.0.18

func WithShellVarAssignments(ctx context.Context, state *ShellVarAssignments) context.Context

func WithShellVarLookup added in v0.0.23

func WithShellVarLookup(ctx context.Context, lookup ShellVarLookup) context.Context

func WithSignalDispatcher added in v0.0.23

func WithSignalDispatcher(ctx context.Context, dispatcher SignalDispatcher) context.Context

func WithSignalFamily added in v0.0.23

func WithSignalFamily(ctx context.Context, family SignalFamily) context.Context

Types

type CompletionSpec

type CompletionSpec struct {
	IsDefault   bool
	IsEmptyLine bool
	Wordlist    string
	HasWordlist bool
	Function    string
	HasFunction bool
	Command     string
	HasCommand  bool
	Filter      string
	HasFilter   bool
	Prefix      string
	HasPrefix   bool
	Suffix      string
	HasSuffix   bool
	Options     []string
	Actions     []string
}

type CompletionState

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

func CompletionStateFromContext

func CompletionStateFromContext(ctx context.Context) *CompletionState

func NewCompletionState

func NewCompletionState() *CompletionState

func (*CompletionState) Clear

func (s *CompletionState) Clear()

func (*CompletionState) Delete

func (s *CompletionState) Delete(name string)

func (*CompletionState) Get

func (s *CompletionState) Get(name string) (CompletionSpec, bool)

func (*CompletionState) Keys

func (s *CompletionState) Keys() []string

func (*CompletionState) Set

func (s *CompletionState) Set(name string, spec *CompletionSpec)

func (*CompletionState) Update

func (s *CompletionState) Update(name string, fn func(*CompletionSpec)) CompletionSpec

type ShellVarAssignments added in v0.0.18

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

func NewShellVarAssignments added in v0.0.18

func NewShellVarAssignments() *ShellVarAssignments

func ShellVarAssignmentsFromContext added in v0.0.18

func ShellVarAssignmentsFromContext(ctx context.Context) *ShellVarAssignments

func (*ShellVarAssignments) Set added in v0.0.18

func (s *ShellVarAssignments) Set(name, value string)

func (*ShellVarAssignments) Snapshot added in v0.0.18

func (s *ShellVarAssignments) Snapshot() map[string]ShellVarUpdate

func (*ShellVarAssignments) Unset added in v0.0.18

func (s *ShellVarAssignments) Unset(name string)

type ShellVarLookup added in v0.0.23

type ShellVarLookup func(name string) (string, bool)

func ShellVarLookupFromContext added in v0.0.23

func ShellVarLookupFromContext(ctx context.Context) ShellVarLookup

type ShellVarUpdate added in v0.0.18

type ShellVarUpdate struct {
	Value string
	Unset bool
}

type SignalDispatcher added in v0.0.23

type SignalDispatcher func(target string, signal int) error

func SignalDispatcherFromContext added in v0.0.23

func SignalDispatcherFromContext(ctx context.Context) SignalDispatcher

type SignalFamily added in v0.0.23

type SignalFamily struct {
	Owner         any
	StablePID     int
	ParentBASHPID int
}

func SignalFamilyFromContext added in v0.0.23

func SignalFamilyFromContext(ctx context.Context) (SignalFamily, bool)

Jump to

Keyboard shortcuts

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