Server.get_option
get_option(name => string, scope => scope, target => id?, global => boolean?, inherited => boolean?).
Source and package
-
Description#
Read an option and return its octets, decoding tmux's quoted string values. Literal backslashes and non-UTF-8 bytes remain distinct on older daemons. Key, numeric and command options retain native printed syntax. Array values are joined with newlines in native index order; an empty array returns
''. Empty text and '0' remain values.inherited => truerequests tmux's-Abehavior; otherwise only the selected local level is queried. Performs I/O without mutation. Native missing-option errors throw"Command" in LibTmux::X; malformed output throws"Codec" in LibTmux::X. A built-in option without a local override may produce empty output. See"set_option"and"unset_option".my $value = $server->get_option(scope => 'window', target => $window->id, name => '@build');Methods#
tmux command#
The tmux commands behind get_option.
tmux C API#
The C declarations in tmux that implement these commands.
tmux options#
Settings for the server, sessions, windows and panes, with their types, defaults and allowed values.
In other ports#
Read one server option
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; Server.showOptions returns them all |
| Rust | server |
| Go | tmux |
| Java | reached through Server.options, whose Options.get reads one |
| C# | reached through Server.Options, whose TmuxOptions.GetAsync reads one |
| C++ | no single-option read; Server::options returns them all |
| Swift | Server |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read one session option
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; Session.showOptions returns them all |
| Rust | session |
| Go | tmux |
| Java | reached through Session.options, whose Options.get reads one |
| C# | reached through Session.Options, whose TmuxOptions.GetAsync reads one |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read one window option
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; Window.showOptions returns them all |
| Rust | window |
| Go | tmux |
| Java | reached through Window.options, whose Options.get reads one |
| C# | reached through Window.Options, whose TmuxOptions.GetAsync reads one |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read one pane option
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no single-option read; Pane.showOptions returns them all |
| Rust | pane |
| Go | tmux |
| Java | reached through Pane.options, whose Options.get reads one |
| C# | reached through Pane.Options, whose TmuxOptions.GetAsync reads one |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.