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-rs latest

Pane.typed_option

Read one option, decoded according to what tmux declares about it.

Source and package
Qualified name
libtmux::pane::Pane::typed_option
Module
pane
Declared in
Pane
Package
libtmux
Source
crates/libtmux/src/pane/settings.rs
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript Go Java C# C++Swift Kotlin Scala OCamlfunction F# Clojure
pub async fn typed_option(&self, name: &str) -> Result< Option<OptionValue>, Error >

Description#

A flag comes back as OptionValue::Flag and a number as OptionValue::Number, so a caller does not decide for itself that on means one. Everything else, including user options, stays text. The one way to read a single option; OptionValue says how reads and writes fit together.

None means the option holds nothing at this pane. A user option, whose name begins with @, exists only while it is set, and a built-in one always exists, so both report an unset option as None.

Errors

Returns an error when tmux does not recognize the option name.

Parameters

tmux options#

Settings for the server, sessions, windows and panes, with their types, defaults and allowed values.

Guides#

Pages that discuss typed_option.

In other ports#

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
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
Swift Server.option(_:scope:)
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