# format_expand

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

```c
char * format_expand(struct format_tree *ft, const char *fmt)
```

## Parameters

- `ft` (`struct format_tree *`)
- `fmt` (`const char *`)

## Called by

- [`cmd_display_menu_get_pos`](/en/tmux/3.7c/reference/c-function-cmd-display-menu-c-cmd_display_menu_get_pos/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-menu.c#L243)
- [`cmd_list_buffers_exec`](/en/tmux/3.7c/reference/c-function-cmd-list-buffers-c-cmd_list_buffers_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-buffers.c#L75)
- [`cmd_list_clients_exec`](/en/tmux/3.7c/reference/c-function-cmd-list-clients-c-cmd_list_clients_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-clients.c#L93)
- [`cmd_list_keys_exec`](/en/tmux/3.7c/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L239)
- [`cmd_list_panes_window`](/en/tmux/3.7c/reference/c-function-cmd-list-panes-c-cmd_list_panes_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-panes.c#L153)
- [`cmd_list_sessions_exec`](/en/tmux/3.7c/reference/c-function-cmd-list-sessions-c-cmd_list_sessions_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-sessions.c#L82)
- [`cmd_list_single_command`](/en/tmux/3.7c/reference/c-function-cmd-list-commands-c-cmd_list_single_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L67)
- [`cmd_list_windows_exec`](/en/tmux/3.7c/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-windows.c#L100)
- [`cmd_run_shell_exec`](/en/tmux/3.7c/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L143)
- [`control_check_subs_all_panes_one`](/en/tmux/3.7c/reference/c-function-control-c-control_check_subs_all_panes_one/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L936)
- [`control_check_subs_all_windows_one`](/en/tmux/3.7c/reference/c-function-control-c-control_check_subs_all_windows_one/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L1016)
- [`control_check_subs_pane`](/en/tmux/3.7c/reference/c-function-control-c-control_check_subs_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L900)
- [`control_check_subs_session`](/en/tmux/3.7c/reference/c-function-control-c-control_check_subs_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L865)
- [`control_check_subs_window`](/en/tmux/3.7c/reference/c-function-control-c-control_check_subs_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L980)
- [`format_single`](/en/tmux/3.7c/reference/c-function-format_single/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5834)
- [`format_window_name`](/en/tmux/3.7c/reference/c-function-names-c-format_window_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/names.c#L135)
- [`options_string_to_style`](/en/tmux/3.7c/reference/c-function-options_string_to_style/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L997)
- [`window_buffer_build`](/en/tmux/3.7c/reference/c-function-window-buffer-c-window_buffer_build/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-buffer.c#L174)
- [`window_buffer_get_key`](/en/tmux/3.7c/reference/c-function-window-buffer-c-window_buffer_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-buffer.c#L317)
- [`window_client_get_key`](/en/tmux/3.7c/reference/c-function-window-client-c-window_client_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-client.c#L228)
- [`window_copy_write_line`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_write_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L4969)
- [`window_customize_build_array`](/en/tmux/3.7c/reference/c-function-window-customize-c-window_customize_build_array/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-customize.c#L258)
- [`window_customize_build_keys`](/en/tmux/3.7c/reference/c-function-window-customize-c-window_customize_build_keys/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-customize.c#L472)
- [`window_customize_build_option`](/en/tmux/3.7c/reference/c-function-window-customize-c-window_customize_build_option/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-customize.c#L316)
- [`window_customize_draw_option`](/en/tmux/3.7c/reference/c-function-window-customize-c-window_customize_draw_option/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-customize.c#L739)
- [`window_tree_build_pane`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_build_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L216)
- [`window_tree_build_session`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_build_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L325)
- [`window_tree_build_window`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_build_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L266)
- [`window_tree_draw_session`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_draw_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L547)
- [`window_tree_draw_window`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_draw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L684)
- [`window_tree_get_key`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L812)

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

## Referenced by

- [`cmd_show_messages_exec`](/en/tmux/3.7c/reference/c-function-cmd-show-messages-c-cmd_show_messages_exec/) (function)

## Referenced declarations

- [`format_expand_state.flags`](/en/tmux/3.7c/reference/c-struct-format_expand_state-flags/) (attribute)
- [`format_tree`](/en/tmux/3.7c/reference/c-struct-format_tree/) (struct)
- [`format_expand_state.ft`](/en/tmux/3.7c/reference/c-struct-format_expand_state-ft/) (attribute)
- [`format_expand_state.start_time`](/en/tmux/3.7c/reference/c-struct-format_expand_state-start_time/) (attribute)
