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

Planner

How a plan is grouped into tmux invocations.

Source and package
Qualified name
libtmux::plan::planner::Planner
Module
plan.planner
Package
libtmux
Source
crates/libtmux/src/plan/planner.rs
enum plan.planner.Planner

Examples#

use libtmux::plan::{Plan, Planner, SendKeys, SplitWindow};
use libtmux::WindowId;
let window: WindowId = "@1".parse()?;
let mut plan = Plan::new();
let pane = plan.add(SplitWindow::new(window).focus());
plan.add(SendKeys::new(pane).text("vim").enter());
plan.add(SendKeys::new(pane).text(":e .").enter());
// The same three operations, grouped three ways.
assert_eq!(Planner::Sequential.steps(&plan).len(), 3);
assert_eq!(Planner::Folding.steps(&plan).len(), 2);
assert_eq!(Planner::Marked.steps(&plan).len(), 1);

Variants3#

Planner variants
CasePayloadDescription
Folding No payload Share one invocation between neighbouring operations that can.
Marked No payload Also share a pane creation with the operations that decorate it.
Sequential No payload One tmux invocation per operation.

Members3#

Common operations2#

  • explain method Group a plan and say why each invocation is separate.
  • steps_bounded method Group a plan, but never share an invocation across a boundary.

Other members1#

  • steps method Group a plan into the invocations it will dispatch as.
Esc

Type to search.

Reference previewOpen reference