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.

enum libtmux-rs latest

OptionKind

What kind of value an option holds.

Source and package
Qualified name
libtmux::options::OptionKind
Module
options
Package
libtmux
Source
crates/libtmux/src/options.rs
enum options.OptionKind

Examples#

use libtmux::{OptionKind, option_schema};
// `mouse` is a real flag: on or off.
assert_eq!(option_schema("mouse").map(OptionSchema::kind), Some(OptionKind::Flag));
// `status` looks like one and is not: it also accepts a count of status
// lines, so reading it as a boolean discards those values.
assert_eq!(option_schema("status").map(OptionSchema::kind), Some(OptionKind::Choice));

Variants7#

OptionKind variants
CasePayloadDescription
Choice No payload One of a fixed set of words.
Colour No payload A terminal colour.
Command No payload A tmux command.
Flag No payload on or off.
Key No payload A key name.
Number No payload An integer.
Text No payload Arbitrary text.
Esc

Type to search.

Reference previewOpen reference