Plan
Plan records ordered tmux commands for later execution. It groups commands that need no answer and lets later steps reference objects earlier steps create.
Source and package
- Qualified name
-
tmux.Plan - Package
- tmux
- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/plan.go
-
Description#
Recording touches nothing.
Plan.Previewrenders what would be sent andPlan.Explainsays how it would be grouped, both without a server;Plan.Runis the only method that reaches tmux.A Plan is not safe for concurrent use. A copy made by assignment shares the owner token its Refs carry, so it accepts them; do not record steps on both, since each would number its steps from the same count.
Plan.Opsreturns a read-only view, not a way to rebuild a plan, so it carries no owner.
Members62#
Common operations1#
- Run method Run sends the recorded operations through server and returns one result per step.
Other members61#
- ClearHistory method ClearHistory records the clearing of the scrollback of the pane target names.
- Cmd method Cmd records raw tmux arguments targeted at target.
- CmdCapture method CmdCapture records raw tmux arguments whose output is returned in the step's
OpResult, and is otherwisePlan.Cmd. - DeleteBuffer method DeleteBuffer records a tmux buffer being removed. An empty name removes the most recently added buffer.
- DetachClient method DetachClient records one client being detached. A client is named directly because plans do not create clients.
- DetachClients method DetachClients records every client attached to the session target names being detached.
- DisplayMessage method DisplayMessage records a format expanded against the object target names, and returns its output in the step's
OpResult. The zeroRefexpands it against no object, the wayPlan.Cmdtakes one. - Explain method Explain reports how
Plan.Runwould group the recorded operations into tmux commands, and why each group ends where it does. It runs no commands. - ExplainWith method ExplainWith reports how planner would group the recorded operations.
- JoinPane method JoinPane records the pane source names being moved beside the pane target names, splitting that pane's space.
- KillOtherPanes method KillOtherPanes records the destruction of every pane in the window holding the pane target names, except that pane.
- KillOtherWindows method KillOtherWindows records the destruction of every window in the session holding the window target names, except that window.
- KillPane method KillPane records the destruction of the pane target names.
- KillServer method KillServer records the tmux server being shut down. Nothing recorded after it can run because the server will be gone.
- KillSession method KillSession records the destruction of the session target names.
- KillWindow method KillWindow records the destruction of the window target names.
- LastPane method LastPane records the window target names returning to its previously active pane.
- LastWindow method LastWindow records the session target names returning to its previously current window.
- Len method Len returns how many operations the plan has recorded.
- LinkWindow method LinkWindow records the window source names being linked into the session target names.
- LockServer method LockServer records every client attached to the server being locked.
- LockSession method LockSession records every client attached to the session target names being locked.
- MovePane method MovePane records the pane source names being moved beside the pane target names without joining it to that pane's layout.
- MoveWindow method MoveWindow records the window source names being moved into the session target names.
- NewSession method NewSession records a detached session and returns a
Refto it. - NewWindow method NewWindow records a window created in the session or beside the window that target names, and returns a
Refto it. - NextLayout method NextLayout records the next preset layout applied to the window target names.
- NextWindow method NextWindow records the session target names moving to its next window.
- Ops method Ops returns the recorded operations, in order, for a
Plannerto group. - PipePane method PipePane records the pane target names having its output piped to a shell command.
- Preview method Preview renders every recorded operation's argument vector without running anything, for the tmux version given.
- PreviousLayout method PreviousLayout records the previous preset layout applied to the window target names.
- PreviousWindow method PreviousWindow records the session target names moving to its previous window.
- RefreshClient method RefreshClient records one client being asked to redraw.
- RenameSession method RenameSession records a new name for the session target names.
- RenameWindow method RenameWindow records a new name for the window target names.
- ResizePane method ResizePane records a resize of the pane target names.
- ResizeWindow method ResizeWindow records a resize of the window target names.
- RespawnPane method RespawnPane records the pane target names being restarted with a new command.
- RespawnWindow method RespawnWindow records the window target names being restarted with a new command.
- RotateWindow method RotateWindow records the panes of the window target names being rotated through their positions.
- RunWith method RunWith runs the plan with planner deciding dispatch grouping. Successful execution produces planner-independent results, but every operation in a failed grouped dispatch is
tmux.OpIndeterminate. UseSequentialfor exact attribution. - SelectLayout method SelectLayout records a layout applied to the window target names. Run checks every recorded layout before dispatching any operation. Recording and Preview perform no I/O; Preview uses its supplied version for name support.
- SelectPane method SelectPane records a selection or marking of the pane target names.
- SelectWindow method SelectWindow records the window target names becoming its session's current window.
- SendKeys method SendKeys records keys sent to the pane target names.
- SendPrefix method SendPrefix records tmux's prefix key sent to the pane target names.
- SetBuffer method SetBuffer records text stored in a tmux buffer.
- SetEnvironment method SetEnvironment records a variable set in the session target names, or in the server's global environment when target is
ServerRefor the zeroRef. - SetHook method SetHook records a tmux hook written on the object target names.
- SetOption method SetOption records a tmux option written on the object target names, or on the server when target is the zero
Refand Global is set. - SetPaneTitle method SetPaneTitle records a title for the pane target names.
- SourceFile method SourceFile records a tmux configuration file being loaded.
- SplitPane method SplitPane records a split of the window or pane target names, and returns a
Refto the pane it will create. - StartServer method StartServer records the tmux server being started if it is not running.
- SuspendClient method SuspendClient records one client being suspended.
- SwapPane method SwapPane records the panes target and source name exchanging places.
- SwapWindow method SwapWindow records the windows target and source name exchanging places. Detach leaves each session's current window unchanged.
- SwitchClient method SwitchClient records one client being moved to the session target names. target may refer to a session an earlier step creates.
- UnlinkWindow method UnlinkWindow records the window target names being removed from the session it is linked into.
- UnsetEnvironment method UnsetEnvironment records a variable removed from the session target names, or from the server's global environment when target is
ServerRefor the zeroRef.
Guides#
Pages that discuss Plan.