# cmd_select_pane_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L84
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/

tmux command: [`last-pane`](/en/tmux/latest/manual/last-pane/)

tmux command: [`select-pane`](/en/tmux/latest/manual/select-pane/)

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

## Parameters

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

## Calls

- [`args_get`](/en/tmux/latest/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L170)
- [`args_has`](/en/tmux/latest/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L115)
- [`cmd_find_from_winlink`](/en/tmux/latest/reference/c-function-cmd_find_from_winlink/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L128)
- [`cmd_find_from_winlink_pane`](/en/tmux/latest/reference/c-function-cmd_find_from_winlink_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L241)
- [`cmd_get_args`](/en/tmux/latest/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L86)
- [`cmd_get_entry`](/en/tmux/latest/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L87)
- [`cmd_select_pane_redraw`](/en/tmux/latest/reference/c-function-cmd-select-pane-c-cmd_select_pane_redraw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L129)
- [`cmdq_error`](/en/tmux/latest/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L112)
- [`cmdq_get_client`](/en/tmux/latest/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L90)
- [`cmdq_get_current`](/en/tmux/latest/reference/c-function-cmdq_get_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L88)
- [`cmdq_get_target`](/en/tmux/latest/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L89)
- [`cmdq_insert_hook`](/en/tmux/latest/reference/c-function-cmdq_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L242)
- [`cmdq_print`](/en/tmux/latest/reference/c-function-cmdq_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L181)
- [`format_single_from_target`](/en/tmux/latest/reference/c-function-format_single_from_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L219)
- [`notify_pane`](/en/tmux/latest/reference/c-function-notify_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L221)
- [`options_set_string`](/en/tmux/latest/reference/c-function-options_set_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L172)
- [`screen_set_title`](/en/tmux/latest/reference/c-function-screen_set_title/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L220)
- [`server_check_marked`](/en/tmux/latest/reference/c-function-server_check_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L140)
- [`server_clear_marked`](/en/tmux/latest/reference/c-function-server_clear_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L146)
- [`server_client_get_pane`](/en/tmux/latest/reference/c-function-server_client_get_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L230)
- [`server_client_set_pane`](/en/tmux/latest/reference/c-function-server_client_set_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L239)
- [`server_redraw_window`](/en/tmux/latest/reference/c-function-server_redraw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L125)
- [`server_redraw_window_borders`](/en/tmux/latest/reference/c-function-server_redraw_window_borders/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L117)
- [`server_set_marked`](/en/tmux/latest/reference/c-function-server_set_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L148)
- [`server_status_window`](/en/tmux/latest/reference/c-function-server_status_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L118)
- [`window_pane_find_down`](/en/tmux/latest/reference/c-function-window_pane_find_down/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L199)
- [`window_pane_find_left`](/en/tmux/latest/reference/c-function-window_pane_find_left/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L187)
- [`window_pane_find_right`](/en/tmux/latest/reference/c-function-window_pane_find_right/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L191)
- [`window_pane_find_up`](/en/tmux/latest/reference/c-function-window_pane_find_up/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L195)
- [`window_pane_is_floating`](/en/tmux/latest/reference/c-function-window_pane_is_floating/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L163)
- [`window_pop_zoom`](/en/tmux/latest/reference/c-function-window_pop_zoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L131)
- [`window_push_zoom`](/en/tmux/latest/reference/c-function-window_push_zoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L124)
- [`window_redraw_active_switch`](/en/tmux/latest/reference/c-function-window_redraw_active_switch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L126)
- [`window_set_active_pane`](/en/tmux/latest/reference/c-function-window_set_active_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L127)

## Other function references

- [`options_get_string`](/en/tmux/latest/reference/c-function-options_get_string/) (function)
- [`server_is_marked`](/en/tmux/latest/reference/c-function-server_is_marked/) (function)
- [`window_count_panes`](/en/tmux/latest/reference/c-function-window_count_panes/) (function)
- [`window_pane_visible`](/en/tmux/latest/reference/c-function-window_pane_visible/) (function)

## Referenced by

- [`cmd_last_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_last_pane_entry/) (attribute)
- [`cmd_select_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_select_pane_entry/) (attribute)

## Referenced declarations

- [`window.active`](/en/tmux/latest/reference/c-struct-window-active/) (attribute)
- [`window_pane.base`](/en/tmux/latest/reference/c-struct-window_pane-base/) (attribute)
- [`CLIENT_ACTIVEPANE`](/en/tmux/latest/reference/c-define-tmux-h-client_activepane/) (constant)
- [`cmd`](/en/tmux/latest/reference/c-struct-cmd/) (struct)
- [`cmd_last_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_last_pane_entry/) (attribute)
- [`CMD_RETURN_ERROR`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/latest/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`cmd_find_state.current`](/en/tmux/latest/reference/c-struct-cmd_find_state-current/) (attribute)
- [`options_entry.entry`](/en/tmux/latest/reference/c-struct-options_entry-entry/) (attribute)
- [`client.flags`](/en/tmux/latest/reference/c-struct-client-flags/) (attribute)
- [`window_pane.flags`](/en/tmux/latest/reference/c-struct-window_pane-flags/) (attribute)
- [`window.last_panes`](/en/tmux/latest/reference/c-struct-window-last_panes/) (attribute)
- [`marked_pane`](/en/tmux/latest/reference/c-variable-marked_pane/) (attribute)
- [`window_pane.options`](/en/tmux/latest/reference/c-struct-window_pane-options/) (attribute)
- [`PANE_INPUTOFF`](/en/tmux/latest/reference/c-define-tmux-h-pane_inputoff/) (constant)
- [`PANE_REDRAW`](/en/tmux/latest/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`PANE_STYLECHANGED`](/en/tmux/latest/reference/c-define-tmux-h-pane_stylechanged/) (constant)
- [`PANE_THEMECHANGED`](/en/tmux/latest/reference/c-define-tmux-h-pane_themechanged/) (constant)
- [`cmd_find_state.s`](/en/tmux/latest/reference/c-struct-cmd_find_state-s/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`window_pane.window`](/en/tmux/latest/reference/c-struct-window_pane-window/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/latest/reference/c-struct-cmd_find_state-wl/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/latest/reference/c-struct-cmd_find_state-wp/) (attribute)
