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.

method libtmux-rs latest

CommandChain.then

Append one command, to run after the previous one succeeds.

Source and package
Qualified name
libtmux::command::CommandChain::then
Module
command
Declared in
CommandChain
Package
libtmux
Source
crates/libtmux/src/command.rs
pub fn then(mut self, command: Command) -> Self

Examples#

use libtmux::{Command, CommandChain};
let chain = CommandChain::new(Command::new("select-pane").arg("-m"))
.then(Command::new("select-pane").arg("-M"));
assert_eq!(chain.command_count(), 2);
Parameters
Esc

Type to search.

Reference previewOpen reference