# libtmux.Session:get_option

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L396
- **Inherited from:** libtmux.Configurable
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-session-get_option/

```
get_option: fun(
  self: libtmux.Configurable<libtmux.SnapshotSession>,
  name: string,
  options?: libtmux.SettingGetOptions,
):libtmux.Request<libtmux.OptionRecord>
```

## Parameters

- `name` (`string`)
- `options` (`libtmux.SettingGetOptions?`)

## tmux command

The tmux commands behind `get_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 session option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.show_option`](/en/py/latest/reference/libtmux-session-show_option/) (method) |
| 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) |

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