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

Command.new

Start a command with one logical tmux subcommand token.

Source and package
Qualified name
libtmux::command::Command::new
Module
command
Declared in
Command
Package
libtmux
Source
crates/libtmux/src/command.rs
#[must_use = "a command has no effect until it is dispatched" ] pub fn new(subcommand: impl Into<OsString>) -> Self

Examples#

use libtmux::Command;
let command = Command::new("list-sessions");
assert_eq!(command.summary().to_string(), r#""list-sessions""#);
Parameters
Esc

Type to search.

Reference previewOpen reference