Plan
Operations recorded but not yet run.
Source and package
- Qualified name
-
libtmux::plan:: Plan - Module
- plan
- Package
- libtmux
- Source
- crates/libtmux/src/plan.rs
-
Examples#
use libtmux::plan::{Plan, RenameWindow, SendKeys};use libtmux::{PaneId, WindowId};let mut plan = Plan::new();plan.add(SendKeys::new("%1".parse::<PaneId>()?).text("clear").enter());plan.add(RenameWindow::new("@1".parse::<WindowId>()?, "ready"));// Nothing has run: the plan can be read first.let rendered = plan.preview();assert_eq!(rendered.len(), 2);assert!(rendered[0].as_ref().is_some_and(|c| c.summary().to_string().contains("send-keys")));
Members10#
Common operations5#
- preview method Render every operation without running any of them.
- add method Record one operation and return a handle to what it creates.
- run_over_control_mode method Run this plan over an open control-mode connection.
- validate method Check every step before a run can change tmux state.
- chain method Record an operation that is allowed to share a tmux invocation.
Other members5#
Guides#
Pages that discuss Plan.
- Guides