# libtmux.Pane._show_option

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/options.py#L1136
- **Inherited from:** libtmux.options.OptionsMixin
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-_show_option/

```
libtmux.Pane._show_option(
    self,
    option: str,
    global_: bool = False,
    g: bool = False,
    scope: OptionScope
    | _DefaultOptionScope
    | None = DEFAULT_OPTION_SCOPE,
    ignore_errors: bool | None = None,
    include_hooks: bool | None = None,
    include_inherited: bool | None = None,
) -> ConvertedValue | None
```

Return option value for the target.

todo: test and return True/False for on/off string

## Examples

```python
>>> import typing as t
>>> from libtmux.common import tmux_cmd
>>> from libtmux.constants import OptionScope
```

```python
>>> class MyServer(OptionsMixin):
...     socket_name = server.socket_name
...     def cmd(self, cmd: str, *args: object):
...         cmd_args: t.List[t.Union[str, int]] = [cmd]
...         if self.socket_name:
...             cmd_args.insert(0, f"-L{self.socket_name}")
...         cmd_args.insert(0, "-f/dev/null")
...         return tmux_cmd(*cmd_args, *args)
...
...     default_option_scope = OptionScope.Server
```

```python
>>> MyServer().cmd('new-session', '-d')
<libtmux.common.tmux_cmd object at ...>
```

```python
>>> MyServer()._show_option('exit-unattached', global_=True)
False
```

## Parameters

- `option` (`str`)
- `global_` (`bool`)
- `g` (`bool`): Use ``global_`` instead. (deprecated 0.50.0)
- `scope` (`OptionScope | _DefaultOptionScope | None`)
- `ignore_errors` (`bool | None`)
- `include_hooks` (`bool | None`)
- `include_inherited` (`bool | None`)

## Raises

- [`exc.OptionError`](/en/py/stable/reference/libtmux-exc-optionerror/)
- [`exc.UnknownOption`](/en/py/stable/reference/libtmux-exc-unknownoption/)
- [`exc.InvalidOption`](/en/py/stable/reference/libtmux-exc-invalidoption/)
- [`exc.AmbiguousOption`](/en/py/stable/reference/libtmux-exc-ambiguousoption/)
