shelllex

package
v2026.609.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltinsForShell added in v2026.608.1

func BuiltinsForShell(effectivePath string) map[string]struct{}

func CommandKnown

func CommandKnown(name string) (found, isBuiltin bool)

func CommandNameFromWord

func CommandNameFromWord(word string) string

func InQuoteRange

func InQuoteRange(line []rune, pos int) bool

func IsEscapedAt

func IsEscapedAt(shell []rune, i int) bool

func IsGoCommandName

func IsGoCommandName(name string) bool

func IsShellOpAt

func IsShellOpAt(shell []rune, i int) bool

func LooksLikePathToken

func LooksLikePathToken(token string) bool

func PathBinCandidates

func PathBinCandidates(prefix string) []string

func QuoteStateAt

func QuoteStateAt(shell []rune, cursor int) (inQuote bool, quote rune)

func ShellBuiltinsMap

func ShellBuiltinsMap() map[string]struct{}

func ShellTokenBounds

func ShellTokenBounds(shell []rune, cursor int) (start, end int)

func SkipShellOp

func SkipShellOp(shell []rune, i int) int

func StripOuterQuotes

func StripOuterQuotes(word string) string

func WordIndexInSegment

func WordIndexInSegment(words []Word, tokenStart int) int

Types

type Segment

type Segment struct {
	Start int
	End   int
	Words []Word
}

func Segments

func Segments(line []rune) []Segment

type Word

type Word struct {
	Start int
	End   int
	Text  string
}

func SegmentWordsAtCursor

func SegmentWordsAtCursor(shell []rune, cursor int) []Word

Jump to

Keyboard shortcuts

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