Skip to main content

Module command_parser

Module command_parser 

Source
Expand description

tmux-compatible command tokenization and command-name lookup.

This module mirrors the frozen tmux cmd-parse.y lexer boundary closely enough for RMUX command dispatch and config parsing to share one parser. Frozen source anchors: /opt/rmux/reference/tmux at commit 31d77e29b6c9fbb07d032018da78db3a8a38d979, especially cmd.c:121 (cmd_table[]) and cmd-parse.y:1053, cmd-parse.y:1201, cmd-parse.y:1626 for argv parsing, continuation handling, and tokenization.

Structs§

CommandEntry
Frozen tmux command table entry used for command lookup.
CommandParseError
Error returned by command tokenization, parsing, or lookup.
CommandParser
A reusable parser with parse-time expansion context.
EnvironmentAssignment
A parse-time name=value environment assignment.
ParsedCommand
One parsed tmux command with a canonical command name.
ParsedCommands
Parser output for one command list.

Enums§

CommandArgument
A parsed command argument.
CommandGrouping
Queue grouping mode captured while parsing a tmux command list.
CommandParseErrorKind
Coarse parse error class used by source-file recovery.

Constants§

COMMAND_TABLE
Frozen command inventory from /opt/rmux/reference/tmux 31d77e29b6c9fbb07d032018da78db3a8a38d979 cmd.c:121.
SOURCE_FILE_MAX_COMMAND_BYTES
Maximum size of a single command parsed from source-file input.

Functions§

is_parse_time_assignment
Returns whether an argv token has the parse-time name=value form.
lookup_command
Looks up a frozen tmux command using exact alias then unique name prefix.
parse_command_arguments
Parses a tmux command argument vector with default expansion context.
parse_command_string
Parses a tmux command string with default expansion context.