# cmd_rename_window_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L46
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmd-rename-window-c-cmd_rename_window_exec/

tmux command: [`rename-window`](/en/tmux/3.7c/manual/rename-window/)

```c
static enum cmd_retval cmd_rename_window_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`check_name`](/en/tmux/3.7c/reference/c-function-check_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L54)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L48)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L55)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L49)
- [`format_single_from_target`](/en/tmux/3.7c/reference/c-function-format_single_from_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L53)
- [`options_set_number`](/en/tmux/3.7c/reference/c-function-options_set_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L61)
- [`server_redraw_window_borders`](/en/tmux/3.7c/reference/c-function-server_redraw_window_borders/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L64)
- [`server_status_window`](/en/tmux/3.7c/reference/c-function-server_status_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L65)
- [`window_set_name`](/en/tmux/3.7c/reference/c-function-window_set_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L60)

## Other function references

- [`args_string`](/en/tmux/3.7c/reference/c-function-args_string/) (function)

## Referenced by

- [`cmd_rename_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_rename_window_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`CMD_RETURN_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`window.options`](/en/tmux/3.7c/reference/c-struct-window-options/) (attribute)
- [`winlink.window`](/en/tmux/3.7c/reference/c-struct-winlink-window/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wl/) (attribute)
