# Libtmux_unix.Client.capture_options

- **Module:** Libtmux_unix
- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/unix/libtmux_unix.mli#L420
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-client-capture_options/

```
val capture_options :
  ?cancel:Cancellation.t ->
  ?include_inherited:bool ->
  t -> Libtmux.Options.scope -> (Libtmux.Options.t, Libtmux.Error.t) result
```

Acquire one bounded option table, excluding hooks. The default includes only local entries. Inherited table enumeration includes built-ins; inherited user options require `read_option` with their explicit name. Built-in descriptors cover every supported release from tmux 3.3a through 3.8; other versions return [`Libtmux.Error.Unsupported`](/en/ocaml/latest/reference/libtmux-error-t-unsupported/).

## Parameters

- `cancel?` (`Cancellation.t`)
- `include_inherited?` (`bool`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Options.scope`)

## tmux command

The tmux commands behind `capture_options`.

- [`show-options`](/en/tmux/latest/manual/show-options/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_show_options_entry`](/en/tmux/latest/reference/c-variable-cmd_show_options_entry/) (attribute)
- [`cmd_show_options_exec`](/en/tmux/latest/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function)

## tmux options

Settings for the server, sessions, windows and panes, with their types, defaults and allowed values.

- [Options](/en/tmux/latest/catalog/options/) (option)

## In other ports

Read the options set on the server

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.show_options`](/en/py/latest/reference/libtmux-server-show_options/) (method) |
| Ruby | [`LibTmux::Server#options`](/en/ruby/latest/reference/libtmux-server-options/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`server.Server.showOptions`](/en/ts/latest/reference/server-server-showoptions/) (method) |
| Rust | [`server.Server.options`](/en/rs/latest/reference/server-server-options/) (method) |
| Go | [`tmux.Server.Options`](/en/go/latest/reference/tmux-server-options/) (method) |
| Java | [`io.github.libtmux.Server.options`](/en/java/latest/reference/io-github-libtmux-server-server-options/) (method) |
| C# | [`LibTmux.Server.Options`](/en/csharp/latest/reference/libtmux-server-options/) (property) |
| C++ | [`libtmux::Server::options`](/en/cxx/latest/reference/libtmux-server-options/) (method) |
| Swift | [`Server.options(_:)`](/en/swift/latest/reference/server-options(_-)/) (method) |
| 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, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read the options set on a session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.show_options`](/en/py/latest/reference/libtmux-session-show_options/) (method) |
| Ruby | [`LibTmux::Session#options`](/en/ruby/latest/reference/libtmux-session-options/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`session.Session.showOptions`](/en/ts/latest/reference/session-session-showoptions/) (method) |
| Rust | [`session.Session.options`](/en/rs/latest/reference/session-session-options/) (method) |
| Go | [`tmux.Session.Options`](/en/go/latest/reference/tmux-session-options/) (method) |
| Java | [`io.github.libtmux.Session.options`](/en/java/latest/reference/io-github-libtmux-session-session-options/) (method) |
| C# | [`LibTmux.Session.Options`](/en/csharp/latest/reference/libtmux-session-options/) (property) |
| C++ | [`libtmux::Session::options`](/en/cxx/latest/reference/libtmux-session-options/) (method) |
| Swift | [`Server.options(_:)`](/en/swift/latest/reference/server-options(_-)/) (method) |
| 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, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read the options set on a window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.show_options`](/en/py/latest/reference/libtmux-window-show_options/) (method) |
| Ruby | [`LibTmux::Window#options`](/en/ruby/latest/reference/libtmux-window-options/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.showOptions`](/en/ts/latest/reference/window-window-showoptions/) (method) |
| Rust | [`window.Window.options`](/en/rs/latest/reference/window-window-options/) (method) |
| Go | [`tmux.Window.Options`](/en/go/latest/reference/tmux-window-options/) (method) |
| Java | [`io.github.libtmux.Window.options`](/en/java/latest/reference/io-github-libtmux-window-window-options/) (method) |
| C# | [`LibTmux.Window.Options`](/en/csharp/latest/reference/libtmux-window-options/) (property) |
| C++ | [`libtmux::Window::options`](/en/cxx/latest/reference/libtmux-window-options/) (method) |
| Swift | [`Server.options(_:)`](/en/swift/latest/reference/server-options(_-)/) (method) |
| 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, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read the options set on a pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.show_options`](/en/py/latest/reference/libtmux-pane-show_options/) (method) |
| Ruby | [`LibTmux::Pane#options`](/en/ruby/latest/reference/libtmux-pane-options/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.showOptions`](/en/ts/latest/reference/pane-pane-showoptions/) (method) |
| Rust | [`pane.Pane.options`](/en/rs/latest/reference/pane-pane-options/) (method) |
| Go | [`tmux.Pane.Options`](/en/go/latest/reference/tmux-pane-options/) (method) |
| Java | [`io.github.libtmux.Pane.options`](/en/java/latest/reference/io-github-libtmux-pane-pane-options/) (method) |
| C# | [`LibTmux.Pane.Options`](/en/csharp/latest/reference/libtmux-pane-options/) (property) |
| C++ | [`libtmux::Pane::options`](/en/cxx/latest/reference/libtmux-pane-options/) (method) |
| Swift | [`Server.options(_:)`](/en/swift/latest/reference/server-options(_-)/) (method) |
| 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, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
