# LibTmux::Pane#pipe

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/operations.rb#L371
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-pane-pipe/

tmux command: [`pipe-pane`](/en/tmux/latest/manual/pipe-pane/)

```
def pipe: (
  ?shell_command: ::String?,
  ?input: bool,
  ?output: bool,
  ?only_if_closed: bool,
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

The shell command and its format expansion are explicitly requested here.
only_if_closed follows tmux -o: an existing pipe is closed, not retained.

Behavior contract: Pane pipes.

## In other ports

### Copy a pane's output to a shell command

- Python: [`libtmux.Pane.pipe`](/en/py/latest/reference/libtmux-pane-pipe/) (method)
- TypeScript: [`pane.Pane.pipeTo`](/en/ts/latest/reference/pane-pane-pipeto/) (method)
- Rust: [`pane.Pane.pipe`](/en/rs/latest/reference/pane-pane-pipe/) (method)
- Go: [`tmux.Pane.Pipe`](/en/go/latest/reference/tmux-pane-pipe/) (method)
- Java: [`io.github.libtmux.Pane.Pane.pipeTo`](/en/java/latest/reference/io-github-libtmux-pane-pane-pipeto/) (method)
- C#: [`LibTmux.Pane.PipeAsync`](/en/csharp/latest/reference/libtmux-pane-pipeasync/) (method)
- C++: [`libtmux::Pane::pipe_to`](/en/cxx/latest/reference/libtmux-pane-pipe_to/) (method)
- Swift: [`Server.pipe(_:to:)`](/en/swift/latest/reference/server-pipe(_-to-)/) (method)
