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

OptionSchema.choices

Return the words a OptionKind::Choice option accepts, in tmux's order.

Source and package
Qualified name
libtmux::options::OptionSchema::choices
Module
options
Declared in
OptionSchema
Package
libtmux
Source
crates/libtmux/src/options.rs
#[must_use] pub const fn choices(&self) -> &'static [&'static str]

Description#

Empty for every other kind. tmux compares a choice exactly, so case matters.

Examples#

use libtmux::option_schema;
let keys = option_schema("mode-keys").expect("a documented option");
assert_eq!(keys.choices(), ["emacs", "vi"]);
let limit = option_schema("history-limit").expect("a documented option");
assert!(limit.choices().is_empty());
Esc

Type to search.

Reference previewOpen reference