Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

function libtmux

_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

Description

Mirrors cmd_parse_from_arguments in cmd-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

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 calls
No call edges in the Python model.

The 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.

Esc
Search in

Type to search.

Reference previewOpen reference