# LibTmux.Server.readOption

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Server.hs#L567
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-readoption/

```haskell
readOption
  :: Server
  -> OptionTarget
  -> OptionLookup
  -> Text
  -> IO (Maybe OptionValue)
```

Signature types: [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`OptionTarget`](/en/haskell/latest/reference/libtmux-options-t-optiontarget/), [`OptionLookup`](/en/haskell/latest/reference/libtmux-options-t-optionlookup/), [`Text`](https://hackage.haskell.org/package/text-2.1.3/docs/Data-Text.html#t:Text), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO), [`Maybe`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#t:Maybe), [`OptionValue`](/en/haskell/latest/reference/libtmux-options-t-optionvalue/).

Read a scalar option from an explicit store. A missing value is
 [Nothing](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#v:Nothing). A present empty string is a [`StringValue`](/en/haskell/latest/reference/libtmux-options-v-stringvalue/) with zero bytes.
 Use [`EffectiveOption`](/en/haskell/latest/reference/libtmux-options-v-effectiveoption/) to include an inherited value. Replies are
 bounded to 64 KiB and contain only the primary command's data.

## Referenced declarations

- [`LibTmux.Options.OptionLookup`](/en/haskell/latest/reference/libtmux-options-t-optionlookup/) (data type)
- [`LibTmux.Options.OptionTarget`](/en/haskell/latest/reference/libtmux-options-t-optiontarget/) (data type)
- [`LibTmux.Options.OptionValue`](/en/haskell/latest/reference/libtmux-options-t-optionvalue/) (data type)
- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)

## tmux command

The tmux commands behind `readOption`.

- [`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)

## Guides

Pages that discuss `readOption`.

- [Read and change options and hooks](/en/haskell/latest/guides/options/)
- [Implementation status](/en/haskell/latest/guides/status/)
