# tmux_window_link:select/1

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_window_link.erl#L70
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_window_link-select-1/

```
select(Link)
-spec select(tmux_model:window_link()) ->
                {ok, tmux_operation:completed()} |
                {error, tmux_operation:failure()}.
```

Select this membership as its session's current window after checking the expected physical window. Performs I/O and returns the command result.

## Parameters

- `Link` (`tmux_model:window_link()`)

## tmux command

The tmux commands behind `select/1`.

- [`select-window`](/en/tmux/latest/manual/select-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_select_window_entry`](/en/tmux/latest/reference/c-variable-cmd_select_window_entry/) (attribute)
- [`cmd_select_window_exec`](/en/tmux/latest/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function)

## In other ports

Make a window active

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.select`](/en/py/latest/reference/libtmux-window-select/) (method) |
| Lua | [`libtmux.WindowLink:select`](/en/lua/latest/reference/libtmux-windowlink-select/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.select`](/en/ts/latest/reference/window-window-select/) (method) |
| Rust | [`window.Window.select`](/en/rs/latest/reference/window-window-select/) (method) |
| Go | [`tmux.Window.Select`](/en/go/latest/reference/tmux-window-select/) (method) |
| Java | [`io.github.libtmux.Window.select`](/en/java/latest/reference/io-github-libtmux-window-window-select/) (method) |
| C# | [`LibTmux.Window.SelectAsync`](/en/csharp/latest/reference/libtmux-window-selectasync/) (method) |
| C++ | [`libtmux::Window::select`](/en/cxx/latest/reference/libtmux-window-select/) (method) |
| Swift | [`Server.select(_:)`](/en/swift/latest/reference/server-select(_-)/) (method) |
| OCaml | [`Libtmux_unix.Client.select_window_at`](/en/ocaml/latest/reference/libtmux_unix-client-select_window_at/) (function) |
| Perl | [`LibTmux::Server::select_window`](/en/perl/latest/reference/libtmux-server-select_window/) (method). Requires an explicit WindowLink or session_id:index context; a physical window alone does not select a session placement. |

No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
