_split_command_list
Split per-command tokens on ;, preserving { ... } blocks.
Source and package
- Qualified name
-
libtmux._internal .log _context. _split _command _list - Module
- libtmux._internal.log_context
- Package
- libtmux
- Source
- src/libtmux/_internal/log_context.py
- _split_command_list ( tokens: Sequence[str], allow_attached_semicolon: bool = True, ) list[_Command
Segment ] -
Description
Mirrors
cmd_parse_from_argumentsincmd-parse.y: a standalone";"separates commands without joining either command's argv, an argument ending in an unescaped";"(when allow_attached_semicolon is True) loses that";"during inspection and ends the command,"\;"stays literal data, and;inside a matched{ ... }block stays inside that block.- Parameters
-
-
allow_attached_semicolon(bool)Default
True
Examples
>>> [... (s.tokens, s.standalone_semicolon)... for s in _split_command_list(["send-keys", "-R", ";", "clear-history"])... ][(['send-keys', '-R'], True), (['clear-history'], False)]>>> [... (s.tokens, s.attached_semicolon)... for s in _split_command_list(["new-window", "-eK=v;", "list-panes"])... ][(['new-window', '-eK=v'], True), (['list-panes'], False)]
Recorded calls
source callsThe Python reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls libtmux._internal.log_context._split_command_list.