# server.Server.showGlobalOptions

- **Module:** server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/server.ts#L1072
- **Page:** https://libtmux.org/en/ts/latest/reference/server-server-showglobaloptions/

```
showGlobalOptions(
  scope: "session" | "window",
  options?: CommandOptions,
): Promise<ReadonlyMap<string, string>>
```

Read the defaults every session or window inherits.

Most of tmux's options live here rather than on an object: a session that
has set nothing reports nothing, while the values actually governing it
are these. [`history-limit`](/en/tmux/latest/catalog/options/history-limit/) and [`default-shell`](/en/tmux/latest/catalog/options/default-shell/) are both global session
options and [`remain-on-exit`](/en/tmux/latest/catalog/options/remain-on-exit/) a global window one; none of the three is
readable any other way.

## Examples

```ts
const defaults = await server.showGlobalOptions("session");
defaults.get("default-shell");
```

## Parameters

- `scope` (`"session" | "window"`)
- `options?` (`CommandOptions`)

## tmux command

The tmux commands behind `showGlobalOptions`.

- [`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 the defaults every session inherits

| Language | Equivalent |
| --- | --- |
| Python | no equivalent on `Server` |
| Rust | no whole-table read; `Server.get_global_option` reads one |
| Go | no equivalent on `Server` |
| Java | [`io.github.libtmux.Server.globalOptions`](/en/java/latest/reference/io-github-libtmux-server-server-globaloptions/) (method) |
| C# | no equivalent on `Server` |
| C++ | [`libtmux::Server::global_options`](/en/cxx/latest/reference/libtmux-server-global_options/) (method) |
| Swift | no equivalent on `Server` |

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