# libtmux::Session::expand

- **Module:** libtmux::Session
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L466
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-session-expand/

```
libtmux::Session::expand(format: std::string_view) -> expected< std::string, CommandFailure >
```

Ask tmux to expand a format against this session.

The fields above are what a session is; this reaches the rest of tmux's vocabulary without a method per variable.

A target tmux cannot find is not an error to tmux. It expands the fields it cannot resolve to nothing, prints the literals around them, and exits zero — so a session that has been killed answers with a blank that reads like a value. This asks for the session's own id alongside the caller's format and reports `missing` when the answer is not this session.
