Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

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:pane(), pipe_command(), pipe_options()) -> {ok, map()} | {error, map()}.

Description#

direction (pipe_options/0) is output (default: pane output to child stdin), input (child stdout to pane input) or both. toggle defaults 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/1 preserves the borrowed pane and its pipe. This is not an Erlang subscription with library flow control. Use stop_pipe/1 to close the pipe; stopping is not process cancellation or a wait for job completion.

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

Equivalents of Copy a pane's output to a shell command in other languages
Language Equivalent
Python libtmux.Pane.pipe
Ruby LibTmux::Pane#pipe
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript pane.Pane.pipeTo
Rust pane.Pane.pipe
Go tmux.Pane.Pipe
Java io.github.libtmux.Pane.pipeTo
C# LibTmux.Pane.PipeAsync
C++ libtmux::Pane::pipe_to
Swift Server.pipe(_:to:)
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#.

Esc

Type to search.

Reference previewOpen reference