package shlex
Import Path
github.com/rsteube/carapace-shlex (on go.dev)
Dependency Relation
imports 7 packages, and imported by 3 packages
Package-Level Type Names (total 5)
the internal state used by the lexer state machine
( LexerState) MarshalJSON() ([]byte, error)
LexerState : github.com/goccy/go-json.Marshaler
LexerState : encoding/json.Marshaler
const COMMENT_STATE
const ESCAPING_QUOTED_STATE
const ESCAPING_STATE
const IN_WORD_STATE
const QUOTING_ESCAPING_STATE
const QUOTING_STATE
const START_STATE
const WORDBREAK_STATE
Token is a (type, value) pair representing a lexographical token.
Index int
RawValue string
State LexerState
Type TokenType
Value string
// index of last opening quote in Value (only correct when in quoting state)
WordbreakType WordbreakType
Equal reports whether tokens a, and b, are equal.
Two tokens are equal if both their types and values are equal. A nil token can
never be equal to another token.
func TokenSlice.CurrentToken() (token Token)
func (*Token).Equal(other *Token) bool
( TokenSlice) CurrentPipeline() TokenSlice
( TokenSlice) CurrentToken() (token Token)
( TokenSlice) FilterRedirects() TokenSlice
( TokenSlice) Pipelines() []TokenSlice
( TokenSlice) Strings() []string
( TokenSlice) WordbreakPrefix() string
( TokenSlice) Words() TokenSlice
func Split(s string) (TokenSlice, error)
func TokenSlice.CurrentPipeline() TokenSlice
func TokenSlice.FilterRedirects() TokenSlice
func TokenSlice.Pipelines() []TokenSlice
func TokenSlice.Words() TokenSlice
TokenType is a top-level token classification: A word, space, comment, unknown.
( TokenType) MarshalJSON() ([]byte, error)
TokenType : github.com/goccy/go-json.Marshaler
TokenType : encoding/json.Marshaler
const COMMENT_TOKEN
const SPACE_TOKEN
const UNKNOWN_TOKEN
const WORD_TOKEN
const WORDBREAK_TOKEN
( WordbreakType) IsPipelineDelimiter() bool
( WordbreakType) IsRedirect() bool
( WordbreakType) MarshalJSON() ([]byte, error)
WordbreakType : github.com/goccy/go-json.Marshaler
WordbreakType : encoding/json.Marshaler
const WORDBREAK_CUSTOM
const WORDBREAK_LIST_AND
const WORDBREAK_LIST_ASYNC
const WORDBREAK_LIST_OR
const WORDBREAK_LIST_SEQUENTIAL
const WORDBREAK_PIPE
const WORDBREAK_PIPE_WITH_STDERR
const WORDBREAK_REDIRECT_INPUT
const WORDBREAK_REDIRECT_INPUT_DUPLICATE
const WORDBREAK_REDIRECT_INPUT_OUTPUT
const WORDBREAK_REDIRECT_INPUT_STRING
const WORDBREAK_REDIRECT_OUTPUT
const WORDBREAK_REDIRECT_OUTPUT_APPEND
const WORDBREAK_REDIRECT_OUTPUT_BOTH
const WORDBREAK_REDIRECT_OUTPUT_BOTH_APPEND
const WORDBREAK_UNKNOWN
Package-Level Functions (only one)
Split partitions of a string into tokens.
Package-Level Constants (total 30)
const BASH_WORDBREAKS = " \t\r\n\"'><=;|&(:"
Lexer state machine states
Classes of lexographic token
Lexer state machine states
Lexer state machine states
Lexer state machine states
Lexer state machine states
Lexer state machine states
Classes of lexographic token
Lexer state machine states
Classes of lexographic token
Classes of lexographic token
COMP_WORDBREAKS
const WORDBREAK_LIST_AND WordbreakType = 13 const WORDBREAK_LIST_OR WordbreakType = 14 const WORDBREAK_LIST_SEQUENTIAL WordbreakType = 12 const WORDBREAK_PIPE_WITH_STDERR WordbreakType = 10 const WORDBREAK_REDIRECT_INPUT_OUTPUT WordbreakType = 8 const WORDBREAK_REDIRECT_INPUT_STRING WordbreakType = 6 const WORDBREAK_REDIRECT_OUTPUT WordbreakType = 2 const WORDBREAK_REDIRECT_OUTPUT_BOTH WordbreakType = 4
Lexer state machine states
Classes of lexographic token
const WORDBREAK_UNKNOWN WordbreakType = 0![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |