# libtmux:with-client

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/client.lisp#L270
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-with-client/

```
(with-client (name &rest options) &body body)
```

Bind NAME to a client and close the original resource on every exit.
Body declarations and multiple values are preserved. Cleanup failure signals
after normal return; during unwind it is retained in CLIENT-CLEANUP-FAILURES.

## Parameters

- `(name &rest options)`
- `body`

## Guides

Pages that discuss `with-client`.

### Concepts

- [Transport and cleanup](/en/lisp/latest/concepts/transport/)

### Examples

- [Capture pane output](/en/lisp/latest/examples/capture-pane-output/)
