CommandChain.new
Start a chain from its first command.
Source and package
- Qualified name
-
libtmux::command:: Command Chain:: new - Module
- command
- Declared in
CommandChain- Package
- libtmux
- Source
- crates/libtmux/src/command.rs
-
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);