shelllex

package
v2026.606.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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