tmux_window_link:swap/3
Swap the physical windows at two checked memberships. Other links to either window remain intact. detach maps to tmux -d and defaults true. tmux applies its session-selection and group-synchronization rules. Returns the command result; old rows still name their original expected windows and can become stale. Performs I/O, with the documented gap between preflight and action.
Source and package
- Qualified name
-
tmux_window _link: swap/3 - Declared in
tmux_window_link- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_window_link.erl
- Other languages
- Perl PowerShell Julia Elixir Haskell Common Lisp Python Ruby LuaTypeScriptRustGo Java C#C++Swift Kotlin Scala OCaml F# Clojure
- swap(Source, Destination, Options) -spec swap(tmux
_model: (), tmuxwindow _link _model: (), swapwindow _link _options ()) -> {ok, tmux_operation: ()} | {error, tmuxcompleted _operation: ()}.failure -
- Parameters
tmux command#
The tmux commands behind swap/3.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Exchange two windows
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | window |
| Rust | window |
| Go | tmux |
| Java | no equivalent on Window |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.