Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

options.OptionScope

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
options
Package
libtmux
Source
crates/libtmux/src/options.rs
enum options.OptionScope
enum [source]
enum [source]
enum options.OptionScope

Which table an option primarily lives in.

Examples

use libtmux::{OptionScope, option_schema};
// The scope says which handle can set an option, which is not guessable
// from the name: `mouse` is per-session, and `exit-empty` is server-wide.
assert!(option_schema("mouse").is_some_and(|o| o.accepts(OptionScope::Session)));
assert!(option_schema("exit-empty").is_some_and(|o| o.accepts(OptionScope::Server)));
// Some options live in two tables at once, and tmux takes a write at
// either. Asking for one scope would have to pick, and picking is wrong.
let remain = option_schema("remain-on-exit").expect("a documented option");
assert_eq!(remain.scopes(), [OptionScope::Window, OptionScope::Pane]);

4 declared, 0 inherited

Members

  • Pane constant Pane options, read with tmux's -p.
  • Server constant Server options, read with tmux's -s.
  • Session constant Session options.
  • Window constant Window options, read with tmux's -w.
Esc

Type to search.