Skip to main content

Module tokenize

Module tokenize 

Source

Structs§

Segment
A segment of a tokenized command.

Enums§

ShellType
Shell type for tokenization rules.

Functions§

is_env_assignment
Check if a word looks like a shell environment variable assignment (NAME=VALUE). Must have at least one char before =, and the name must be alphanumeric/underscore.
leading_env_assignment_values
Return the values from leading NAME=VALUE tokens in a raw segment. Stops at the first non-assignment word, matching the shell prefix-assignment model.
leading_env_assignments
Return the values from leading NAME=VALUE tokens in a raw segment. Stops at the first non-assignment word, matching the shell prefix-assignment model.
tokenize
Tokenize a command string according to shell type.