# cmd_select_window_exec

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

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

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

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

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

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

## Parameters

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

## Calls

- [`args_has`](/en/tmux/3.7c/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L96)
- [`cmd_find_from_session`](/en/tmux/3.7c/reference/c-function-cmd_find_from_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L123)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L87)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L109)
- [`cmdq_get_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L88)
- [`cmdq_get_current`](/en/tmux/3.7c/reference/c-function-cmdq_get_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L89)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L90)
- [`cmdq_insert_hook`](/en/tmux/3.7c/reference/c-function-cmdq_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L125)
- [`recalculate_sizes`](/en/tmux/3.7c/reference/c-function-recalculate_sizes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L147)
- [`server_redraw_session`](/en/tmux/3.7c/reference/c-function-server_redraw_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L124)
- [`session_last`](/en/tmux/3.7c/reference/c-function-session_last/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L118)
- [`session_next`](/en/tmux/3.7c/reference/c-function-session_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L108)
- [`session_previous`](/en/tmux/3.7c/reference/c-function-session_previous/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L113)

## Other function references

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

## Referenced by

- [`cmd_last_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_last_window_entry/) (attribute)
- [`cmd_next_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_next_window_entry/) (attribute)
- [`cmd_previous_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_previous_window_entry/) (attribute)
- [`cmd_select_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_select_window_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`cmd_last_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_last_window_entry/) (attribute)
- [`cmd_next_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_next_window_entry/) (attribute)
- [`cmd_previous_window_entry`](/en/tmux/3.7c/reference/c-variable-cmd_previous_window_entry/) (attribute)
- [`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)
- [`cmd_find_state.current`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-current/) (attribute)
- [`session.curw`](/en/tmux/3.7c/reference/c-struct-session-curw/) (attribute)
- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`window.latest`](/en/tmux/3.7c/reference/c-struct-window-latest/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`client.session`](/en/tmux/3.7c/reference/c-struct-client-session/) (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)
