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.new

Start a chain from its first command.

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

Description#

Taking the first command here keeps a chain non-empty by construction: an empty argv would make tmux act as a client rather than run anything.

Examples#

use libtmux::{Command, CommandChain};
let chain = CommandChain::new(Command::new("list-sessions"));
assert_eq!(chain.command_count(), 1);
Parameters
Esc

Type to search.

Reference previewOpen reference