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

escape_trailing_separator

Return value as one tmux argument that keeps a final ;.

Source and package
Qualified name
libtmux.common.escape_trailing_separator
Module
libtmux.common
Package
libtmux
Source
src/libtmux/common.py
escape_trailing_separator (value: str) → str

Description

tmux ends a command at an argument whose last character is ; and starts the next one there. It reads a backslash before that ; as an escape and passes the ; through as data. Typed libtmux methods call this on every free-text value they place in a command, so a value ends up in tmux unchanged.

Parameters

Examples

>>> escape_trailing_separator("abc;")
'abc\\;'

A ; inside the value, and a value without one, are unchanged:

>>> escape_trailing_separator("a;b")
'a;b'

A value that already ends in \; gets its own escape:

>>> escape_trailing_separator("abc\\;")
'abc\\\\;'

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.common.escape_trailing_separator.

Esc
Search in

Type to search.

Reference previewOpen reference