# format_window_name

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

```c
static char * format_window_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#L5329)

## 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#L4697)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4701)

## Referenced declarations

- [`format_expand_state`](/en/tmux/3.7c/reference/c-struct-format_expand_state/) (struct)
- [`format_log`](/en/tmux/3.7c/reference/c-define-format-c-format_log/) (constant)
- [`format_expand_state.ft`](/en/tmux/3.7c/reference/c-struct-format_expand_state-ft/) (attribute)
- [`window.name`](/en/tmux/3.7c/reference/c-struct-window-name/) (attribute)
- [`format_tree.s`](/en/tmux/3.7c/reference/c-struct-format_tree-s/) (attribute)
- [`winlink.window`](/en/tmux/3.7c/reference/c-struct-winlink-window/) (attribute)
- [`session.windows`](/en/tmux/3.7c/reference/c-struct-session-windows/) (attribute)
