# session_select

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

```c
int session_select(struct session *s, int idx)
```

## Parameters

- `s` (`struct session *`)
- `idx` (`int`)

## Called by

- [`cmd_break_pane_exec`](/en/tmux/3.7c/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-break-pane.c#L134)
- [`cmd_join_pane_exec`](/en/tmux/3.7c/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-join-pane.c#L128)
- [`cmd_new_session_exec`](/en/tmux/3.7c/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-new-session.c#L326)
- [`cmd_swap_window_exec`](/en/tmux/3.7c/reference/c-function-cmd-swap-window-c-cmd_swap_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-window.c#L83)
- [`server_link_window`](/en/tmux/3.7c/reference/c-function-server_link_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-fn.c#L298)
- [`spawn_window`](/en/tmux/3.7c/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L190)

## Calls

- [`session_set_current`](/en/tmux/3.7c/reference/c-function-session_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L456)
- [`winlink_find_by_index`](/en/tmux/3.7c/reference/c-function-winlink_find_by_index/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L455)

## Referenced by

- [`cmd_select_window_exec`](/en/tmux/3.7c/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function)

## Referenced declarations

- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`session`](/en/tmux/3.7c/reference/c-struct-session/) (struct)
- [`session.windows`](/en/tmux/3.7c/reference/c-struct-session-windows/) (attribute)
