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

_unfinished

Return why plain text appended to template would not stay literal.

Source and package
Qualified name
libtmux.formats._unfinished
Module
libtmux.formats
Package
libtmux
Source
src/libtmux/formats.py
_unfinished (template: str) → str | None

Description

Text is literal only where tmux reads text: not after a trailing #, which combines with the next character, not inside an unclosed #{...}, #(...) or #[...], and not after an unfinished % time field.

Parameters

Examples

>>> _unfinished("#{session_name}-") is None
True
>>> _unfinished("#{session_name}#")
'it ends with #'
>>> _unfinished("##")
'it ends with #'
>>> _unfinished("#{?pane_active,")
'it ends inside #{...}'
>>> _unfinished("#(echo ")
'it ends inside #(...)'
>>> _unfinished("Progress: 100%")
'it ends inside a % time field'

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.formats._unfinished.

Esc
Search in

Type to search.

Reference previewOpen reference