# format_loop_sessions

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

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

## Parameters

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

## Called by

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

## Calls

- [`format_choose`](/en/tmux/latest/reference/c-function-format-c-format_choose/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4644)
- [`format_copy_state`](/en/tmux/latest/reference/c-function-format-c-format_copy_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4666)
- [`format_defaults`](/en/tmux/latest/reference/c-function-format_defaults/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4665)
- [`format_expand1`](/en/tmux/latest/reference/c-function-format-c-format_expand1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4668)
- [`format_free`](/en/tmux/latest/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4669)
- [`sort_get_sessions`](/en/tmux/latest/reference/c-function-sort_get_sessions/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4652)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4649)
- [`xrealloc`](/en/tmux/latest/reference/c-function-xrealloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4672)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4645)

## Other function references

- [`format_create`](/en/tmux/latest/reference/c-function-format_create/) (function)

## Referenced declarations

- [`format_tree.c`](/en/tmux/latest/reference/c-struct-format_tree-c/) (attribute)
- [`format_tree.client`](/en/tmux/latest/reference/c-struct-format_tree-client/) (attribute)
- [`format_tree.flags`](/en/tmux/latest/reference/c-struct-format_tree-flags/) (attribute)
- [`format_expand_state`](/en/tmux/latest/reference/c-struct-format_expand_state/) (struct)
- [`FORMAT_LAST`](/en/tmux/latest/reference/c-define-tmux-h-format_last/) (constant)
- [`format_log`](/en/tmux/latest/reference/c-define-format-c-format_log/) (constant)
- [`FORMAT_NONE`](/en/tmux/latest/reference/c-define-tmux-h-format_none/) (constant)
- [`format_expand_state.ft`](/en/tmux/latest/reference/c-struct-format_expand_state-ft/) (attribute)
- [`session.id`](/en/tmux/latest/reference/c-struct-session-id/) (attribute)
- [`format_tree.item`](/en/tmux/latest/reference/c-struct-format_tree-item/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`sort_crit`](/en/tmux/latest/reference/c-variable-format-c-sort_crit/) (attribute)
