# Libtmux_eio.Client.read_option

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L326
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-read_option/

```
val read_option :
  ?include_inherited:bool ->
  t ->
  Libtmux.Options.scope ->
  string -> (Libtmux.Options.value option, Libtmux.Error.t) result
```

Read one exact name, including user-option inheritance. `None` means no entry under the selected policy. An invalid target remains an error. The default follows inheritance; this does not identify the defining parent scope.

## Parameters

- `include_inherited?` (`bool`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Options.scope`)
- `arg3` (`string`)

## tmux command

The tmux commands behind `read_option`.

- [`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 one server option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.show_option`](/en/py/latest/reference/libtmux-server-show_option/) (method) |
| Lua | [`libtmux.Server:get_option`](/en/lua/latest/reference/libtmux-server-get_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; `Server.showOptions` returns them all |
| Rust | [`server.Server.typed_option`](/en/rs/latest/reference/server-server-typed_option/) (method) |
| Go | [`tmux.Server.RawOption`](/en/go/latest/reference/tmux-server-rawoption/) (method) |
| Java | reached through `Server.options`, whose `Options.get` reads one |
| C# | reached through `Server.Options`, whose `TmuxOptions.GetAsync` reads one |
| C++ | no single-option read; `Server::options` returns them all |
| Swift | [`Server.option(_:scope:)`](/en/swift/latest/reference/server-option(_-scope-)/) (method) |
| Perl | [`LibTmux::Server::get_option`](/en/perl/latest/reference/libtmux-server-get_option/) (method). Pass scope => 'server' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read one session option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.show_option`](/en/py/latest/reference/libtmux-session-show_option/) (method) |
| Lua | [`libtmux.Session:get_option`](/en/lua/latest/reference/libtmux-session-get_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; `Session.showOptions` returns them all |
| Rust | [`session.Session.typed_option`](/en/rs/latest/reference/session-session-typed_option/) (method) |
| Go | [`tmux.Session.RawOption`](/en/go/latest/reference/tmux-session-rawoption/) (method) |
| Java | reached through `Session.options`, whose `Options.get` reads one |
| C# | reached through `Session.Options`, whose `TmuxOptions.GetAsync` reads one |
| C++ | [`libtmux::Session::option`](/en/cxx/latest/reference/libtmux-session-option/) (method) |
| Swift | [`Server.option(_:scope:)`](/en/swift/latest/reference/server-option(_-scope-)/) (method) |
| Perl | [`LibTmux::Server::get_option`](/en/perl/latest/reference/libtmux-server-get_option/) (method). Pass scope => 'session' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read one window option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.show_option`](/en/py/latest/reference/libtmux-window-show_option/) (method) |
| Lua | [`libtmux.Window:get_option`](/en/lua/latest/reference/libtmux-window-get_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; `Window.showOptions` returns them all |
| Rust | [`window.Window.typed_option`](/en/rs/latest/reference/window-window-typed_option/) (method) |
| Go | [`tmux.Window.RawOption`](/en/go/latest/reference/tmux-window-rawoption/) (method) |
| Java | reached through `Window.options`, whose `Options.get` reads one |
| C# | reached through `Window.Options`, whose `TmuxOptions.GetAsync` reads one |
| C++ | [`libtmux::Window::option`](/en/cxx/latest/reference/libtmux-window-option/) (method) |
| Swift | [`Server.option(_:scope:)`](/en/swift/latest/reference/server-option(_-scope-)/) (method) |
| Perl | [`LibTmux::Server::get_option`](/en/perl/latest/reference/libtmux-server-get_option/) (method). Pass scope => 'window' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Read one pane option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.show_option`](/en/py/latest/reference/libtmux-pane-show_option/) (method) |
| Lua | [`libtmux.Pane:get_option`](/en/lua/latest/reference/libtmux-pane-get_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; `Pane.showOptions` returns them all |
| Rust | [`pane.Pane.typed_option`](/en/rs/latest/reference/pane-pane-typed_option/) (method) |
| Go | [`tmux.Pane.RawOption`](/en/go/latest/reference/tmux-pane-rawoption/) (method) |
| Java | reached through `Pane.options`, whose `Options.get` reads one |
| C# | reached through `Pane.Options`, whose `TmuxOptions.GetAsync` reads one |
| C++ | [`libtmux::Pane::option`](/en/cxx/latest/reference/libtmux-pane-option/) (method) |
| Swift | [`Server.option(_:scope:)`](/en/swift/latest/reference/server-option(_-scope-)/) (method) |
| Perl | [`LibTmux::Server::get_option`](/en/perl/latest/reference/libtmux-server-get_option/) (method). Pass scope => 'pane' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
