tmux_pane:pipe/3
Connect a shell process to this registered physical pane, performing I/O. An explicit nonempty #{shell => Command} is required (pipe_command/0). tmux hash formats and strftime directives are escaped so the shell receives the supplied text. This does not quote values interpolated into shell code; the caller owns that quoting. Executable argv is not accepted by this shell-only native command. Encoding follows tmux_command:literal_format/2 in time mode. A percent-bearing command above its native 8191-byte intermediate limit returns format_limit before dispatch, preserving any existing pipe.
Source and package
- Qualified name
-
tmux_pane: pipe/3 - Declared in
tmux_pane- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_pane.erl
- Other languages
- Perl PowerShell Julia Elixir Haskell Common Lisp PythonRuby Lua TypeScriptRustGoJavaC#C++Swift Kotlin Scala OCaml F# Clojure
- pipe/3 -spec pipe(tmux
_model: (), pipepane _command (), pipe_options ()) -> {ok, map()} | {error, map()}. -
Description#
direction(pipe_options/0) isoutput(default: pane output to child stdin),input(child stdout to pane input) orboth.toggledefaults false, replacing any existing pipe. True maps to native-o: close an existing pipe without starting another, or open one when none exists. A stopped pipe and replacement can discard pending output. Await consumer acknowledgements before closing if delivered bytes matter. This is a live PTY byte stream, not rendered capture text or replay of terminal history; terminal modes affect its bytes.The child is started by tmux through
/bin/sh -c. Its stderr is discarded; unused directions are routed to the native null device. No pane cwd or environment copying is promised. A successful command result does not prove exec success, readiness, delivery or child exit. The process is tmux-owned;tmux_server:close/1preserves the borrowed pane and its pipe. This is not an Erlang subscription with library flow control. Usestop_pipe/1to close the pipe; stopping is not process cancellation or a wait for job completion.- Parameters
-
-
Pane(tmux_model: ()) #pane -
Command(pipe_command ()) # -
Options(pipe_options ()) #
-
tmux command#
The tmux commands behind pipe/3.
tmux C API#
The C declarations in tmux that implement these commands.
Guides#
Pages that discuss pipe/3.
In other ports#
Copy a pane's output to a shell command
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | pane |
| Rust | pane |
| Go | tmux |
| Java | io |
| 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 Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.