# libtmux.common.escape_trailing_separator

- **Module:** libtmux.common
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/efdbb5637666b166358772ecc737b3807beab21e/src/libtmux/common.py#L405
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-common-escape_trailing_separator/

```
libtmux.common.escape_trailing_separator(value: str) -> str
```

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

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

- `value` (`str`)

## Examples

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

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

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

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

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