# libtmux.formats._unfinished

- **Module:** libtmux.formats
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/d2a146c9a045437b92013d65943b7ac70013fa24/src/libtmux/formats.py#L183
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-formats-_unfinished/

```
libtmux.formats._unfinished(template: str) -> str | None
```

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

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

- `template` (`str`)

## Examples

```python
>>> _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'
```
