Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-swift latest

Server.option(_:scope:)

The value of one option, or nil if it is not set in that table.

Source and package
Qualified name
Server.option(_:scope:)
Declared in
Server
Package
libtmux-swift
Source
Sources/LibTmux/Options.swift
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript RustGo Java C# C++ Kotlin Scala OCamlfunction F# Clojure

Description#

Presence comes from the table listing and the value from show-options -v, because neither answers both portably: the listing quotes a value containing spaces, while -v answers a name that is known but unset in this table with empty output — and reading emptiness as absence would erase the difference between an option nobody set and one deliberately set to "".

Parameters
Raises

tmux command#

The tmux commands behind option(_:scope:).

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.

Guides#

Pages that discuss option(_:scope:).

In other ports#

Read one server option

Equivalents of Read one server option in other languages
Language Equivalent
Python libtmux.Server.show_option
Lua libtmux.Server:get_option
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.Server.typed_option
Go tmux.Server.RawOption
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
OCaml Libtmux_unix.Client.read_option Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy.
Perl LibTmux::Server::get_option Pass scope => 'server' and the explicit target ID where applicable; inherited and global reads are deliberate options.

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

Read one session option

Equivalents of Read one session option in other languages
Language Equivalent
Python libtmux.Session.show_option
Lua libtmux.Session:get_option
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.Session.typed_option
Go tmux.Session.RawOption
Java reached through Session.options, whose Options.get reads one
C# reached through Session.Options, whose TmuxOptions.GetAsync reads one
C++ libtmux::Session::option
OCaml Libtmux_unix.Client.read_option Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy.
Perl LibTmux::Server::get_option Pass scope => 'session' and the explicit target ID where applicable; inherited and global reads are deliberate options.

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

Read one window option

Equivalents of Read one window option in other languages
Language Equivalent
Python libtmux.Window.show_option
Lua libtmux.Window:get_option
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.Window.typed_option
Go tmux.Window.RawOption
Java reached through Window.options, whose Options.get reads one
C# reached through Window.Options, whose TmuxOptions.GetAsync reads one
C++ libtmux::Window::option
OCaml Libtmux_unix.Client.read_option Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy.
Perl LibTmux::Server::get_option Pass scope => 'window' and the explicit target ID where applicable; inherited and global reads are deliberate options.

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

Read one pane option

Equivalents of Read one pane option in other languages
Language Equivalent
Python libtmux.Pane.show_option
Lua libtmux.Pane:get_option
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.Pane.typed_option
Go tmux.Pane.RawOption
Java reached through Pane.options, whose Options.get reads one
C# reached through Pane.Options, whose TmuxOptions.GetAsync reads one
C++ libtmux::Pane::option
OCaml Libtmux_unix.Client.read_option Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy.
Perl LibTmux::Server::get_option Pass scope => 'pane' and the explicit target ID where applicable; inherited and global reads are deliberate options.

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

Esc

Type to search.

Reference previewOpen reference