# Server.pipe(_:to:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Navigation.swift#L327
- **Page:** https://libtmux.org/reference/swift/server-pipe(_-to-)/

```
Server.pipe(_:to:)(pane: Pane, to: String?) -> ()
```

Copies everything a pane outputs to a shell command, or stops doing so when `command` is omitted.

> Warning: tmux expands the command as a format before running it, so
> `#(...)` inside it runs first and separately. Write the command, or
> double the `#` in anything that reaches one from elsewhere.

## Raises

- `TmuxError`
