# libtmux.Pane.show_hooks

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

tmux catalog: [Hooks](/en/tmux/latest/catalog/hooks/)

```
libtmux.Pane.show_hooks(
    self,
    global_: bool | None = False,
    scope: OptionScope
    | _DefaultOptionScope
    | None = DEFAULT_OPTION_SCOPE,
) -> HookDict
```

Return a dict of hooks for the target.

## Examples

```python
>>> session.set_hook('session-renamed[0]', 'display-message "test"')
Session($...)
```

```python
>>> hooks = session.show_hooks()
>>> isinstance(hooks, dict)
True
```

```python
>>> 'session-renamed[0]' in hooks
True
```

```python
>>> session.unset_hook('session-renamed')
Session($...)
```

## Parameters

- `global_` (`bool | None`): Pass ``-g`` flag for global hooks, default False.
- `scope` (`OptionScope | _DefaultOptionScope | None`): Hook scope (Server/Session/Window/Pane), defaults to object's scope.

## Returns

HookDict
    Dictionary mapping hook names to their values.

## In other ports

### Read a pane's hooks

- Ruby: [`LibTmux::Pane#hooks`](/en/ruby/latest/reference/libtmux-pane-hooks/) (method)
- Lua: [`libtmux.Pane:list_hooks`](/en/lua/latest/reference/libtmux-pane-list_hooks/) (method)
- TypeScript: [`pane.Pane.showHooks`](/en/ts/latest/reference/pane-pane-showhooks/) (method)
- Go: [`tmux.Pane.Hooks`](/en/go/latest/reference/tmux-pane-hooks/) (method)
- Java: [`io.github.libtmux.Pane.Pane.hooks`](/en/java/latest/reference/io-github-libtmux-pane-pane-hooks/) (method)
- C#: [`LibTmux.Pane.Hooks`](/en/csharp/latest/reference/libtmux-pane-hooks/) (property)
- Swift: [`Server.hooks(_:)`](/en/swift/latest/reference/server-hooks(_-)/) (method)
