# format_session_name

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4613
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-format-c-format_session_name/

```c
static char * format_session_name(struct format_expand_state *es, const char *fmt)
```

## Parameters

- `es` (`struct format_expand_state *`)
- `fmt` (`const char *`)

## Called by

- [`format_replace`](/en/tmux/3.7c/reference/c-function-format-c-format_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5333)

## Calls

- [`format_expand1`](/en/tmux/3.7c/reference/c-function-format-c-format_expand1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4618)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4622)

## Referenced declarations

- [`format_expand_state`](/en/tmux/3.7c/reference/c-struct-format_expand_state/) (struct)
- [`session.name`](/en/tmux/3.7c/reference/c-struct-session-name/) (attribute)
