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.options

Read every option set on this pane, decoded by its declared kind.

Source and package
Qualified name
libtmux::pane::Pane::options
Module
pane
Declared in
Pane
Package
libtmux
Source
crates/libtmux/src/pane/settings.rs
Other languages
Perl Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRuby Lua TypeScriptGoJavaC#C++Swift Kotlin Scala OCamlfunction F# Clojure
pub async fn options(&self) -> Result< BTreeMap<String, OptionValue>, Error >

Description#

Costs one tmux command per option, because each value is read as the bytes tmux stored rather than the form it lists them in. Use Self::option_names() when only the names are wanted, and Self::typed_option() for one value.

Reports what is set at this scope, not what the object resolves to. A session that has set nothing of its own answers empty even though every option still has an effective value it inherits.

Errors

Returns an error when tmux cannot be reached or refuses the listing. An empty map means nothing is set, never that the listing failed.

Examples#

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("opts").await?;
let window = session.active_window().await?.expect("a session has a window");
let pane = window.active_pane().await?.expect("a window has a pane");
pane.set_option("@marker", "set").await?;
assert!(pane.options().await?.contains_key("@marker"));
guard.shutdown().await?;

tmux options#

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

Guides#

Pages that discuss options.

In other ports#

Read the options set on a pane

Equivalents of Read the options set on a pane in other languages
Language Equivalent
Python libtmux.Pane.show_options
Ruby LibTmux::Pane#options
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript pane.Pane.showOptions
Go tmux.Pane.Options
Java io.github.libtmux.Pane.options
C# LibTmux.Pane.Options
C++ libtmux::Pane::options
Swift Server.options(_:)
OCaml Libtmux_unix.Client.capture_options Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy.
Perl No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.

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

Esc

Type to search.

Reference previewOpen reference