# tmux_pane:join/3

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_pane.erl#L236
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_pane-join-3/

```
join(Source, Destination, Options)
-spec join(tmux_model:pane(),
           tmux_model:pane(),
           join_options()) ->
              {ok, tmux_operation:completed()} |
              {error, map()}.
```

Move a source pane into a split beside the destination pane. Both physical IDs must belong to the same registered owner and must differ. Geometry follows `t:join_options/0`. Existing processes and pane IDs survive; dimensions, indexes and inherited window options can change. Removing a window's last pane destroys that physical window and its links, and can remove sessions.

Default detach true avoids selecting the resolved destination session; false
uses tmux's resolved session context for the destination pane. Shared physical
windows affect all their memberships. Returns the command result without
refreshing either row. Use `get/2` for current fields. No retry is performed.

## Parameters

- `Source` (`tmux_model:pane()`)
- `Destination` (`tmux_model:pane()`)
- `Options` (`join_options()`)

## tmux command

The tmux commands behind `join/3`.

- [`join-pane`](/en/tmux/latest/manual/join-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_join_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_join_pane_entry/) (attribute)
- [`cmd_join_pane_exec`](/en/tmux/latest/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function)

## Guides

Pages that discuss `join/3`.

- [Native API documentation](/en/erlang/latest/guides/api-documentation/)
- [Isolate and rejoin a running pane](/en/erlang/latest/guides/panes/)

## In other ports

Move a pane into another window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.join`](/en/py/latest/reference/libtmux-pane-join/) (method) |
| Ruby | [`LibTmux::Pane#join`](/en/ruby/latest/reference/libtmux-pane-join/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.joinTo`](/en/ts/latest/reference/pane-pane-jointo/) (method) |
| Rust | no equivalent on `Pane` |
| Go | [`tmux.Pane.Join`](/en/go/latest/reference/tmux-pane-join/) (method) |
| Java | [`io.github.libtmux.Pane.joinTo`](/en/java/latest/reference/io-github-libtmux-pane-pane-jointo/) (method) |
| C# | [`LibTmux.Pane.JoinAsync`](/en/csharp/latest/reference/libtmux-pane-joinasync/) (method) |
| C++ | [`libtmux::Pane::join`](/en/cxx/latest/reference/libtmux-pane-join/) (method) |
| Swift | [`Server.join(_:into:direction:size:)`](/en/swift/latest/reference/server-join(_-into-direction-size-)/) (method) |
| OCaml | [`Libtmux_unix.Client.move_pane`](/en/ocaml/latest/reference/libtmux_unix-client-move_pane/) (function) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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