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
-
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#
| Case | Payload | Description |
|---|---|---|
| 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. |