shelllex

package
v2026.925.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 7 Imported by: 0 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

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