pub struct Tmux<'a> {Show 18 fields
pub colours256: bool,
pub control_mode: bool,
pub disable_echo: bool,
pub no_daemon: bool,
pub login_shell: bool,
pub no_start: bool,
pub force_utf8: bool,
pub verbose_logging: bool,
pub version: bool,
pub shell_command: Option<Cow<'a, str>>,
pub file: Option<Cow<'a, str>>,
pub socket_name: Option<Cow<'a, str>>,
pub socket_path: Option<Cow<'a, str>>,
pub features: Option<Cow<'a, str>>,
pub command: Option<TmuxCommands<'a>>,
pub stdin: Option<StdIO>,
pub stdout: Option<StdIO>,
pub stderr: Option<StdIO>,
}
Expand description
§Manual
tmux ^3.2:
tmux [-2CDluvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [-T features] [command [flags]]
tmux ^2.1:
tmux [-2CluvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^1.9:
tmux [-2lCquvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^1.8:
tmux [-28lCquvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]
tmux ^1.4:
tmux [-28lquvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^1.1:
tmux [-28lquv] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^1.0:
tmux [-28dlqUuv] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^0.9:
tmux [-28dqUuv] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
tmux ^0.8:
tmux [-28dqUuVv] [-f file] [-L socket-name] [-S socket-path] [command [flags]]
Fields§
§colours256: bool
[-2]
- Force tmux to assume the terminal supports 256 colours
control_mode: bool
[-C]
- Start in control mode
disable_echo: bool
[-CC]
- Disable echo
no_daemon: bool
[-D]
- Do not start the tmux server as a daemon. This also turns the exit-empty option off. With -D, command may not be specified.
login_shell: bool
[-l]
- Behave as a login shell
no_start: bool
[-N]
- Do not start the server even if the command would normally do so (for example new-session or start-server).
force_utf8: bool
[-u]
- Write UTF-8 output to the terminal
verbose_logging: bool
[-v]
- Request verbose logging
version: bool
[-V]
- Report the tmux version
shell_command: Option<Cow<'a, str>>
[-c shell-command]
- Execute shell-command using the default shell
file: Option<Cow<'a, str>>
[-f file]
- Specify an alternative configuration file
socket_name: Option<Cow<'a, str>>
[-L socket-name]
- Allow a different socket name to be specified
socket_path: Option<Cow<'a, str>>
[-S socket-path]
- Specify a full alternative path to the server socket
features: Option<Cow<'a, str>>
[-T features]
- Set terminal features for the client
command: Option<TmuxCommands<'a>>
[command]
stdin: Option<StdIO>
(1)
stdout: Option<StdIO>
(2)
stderr: Option<StdIO>
(3)
Implementations§
Source§impl<'a> Tmux<'a>
impl<'a> Tmux<'a>
pub fn new() -> Self
Sourcepub fn colours256(self) -> Self
pub fn colours256(self) -> Self
[-2]
- Force tmux to assume the terminal supports 256 colours
Sourcepub fn control_mode(self) -> Self
pub fn control_mode(self) -> Self
[-C]
- Start in control mode
Sourcepub fn disable_echo(self) -> Self
pub fn disable_echo(self) -> Self
[-CC]
- Disable echo
Sourcepub fn no_daemon(self) -> Self
pub fn no_daemon(self) -> Self
[-D]
- Do not start the tmux server as a daemon. This also turns the exit-empty option off. With -D, command may not be specified.
Sourcepub fn login_shell(self) -> Self
pub fn login_shell(self) -> Self
[-l]
- Behave as a login shell
Sourcepub fn no_start(self) -> Self
pub fn no_start(self) -> Self
[-N]
- Do not start the server even if the command would normally do so (for example new-session or start-server).
Sourcepub fn force_utf8(self) -> Self
pub fn force_utf8(self) -> Self
[-u]
- Write UTF-8 output to the terminal
Sourcepub fn verbose_logging(self) -> Self
pub fn verbose_logging(self) -> Self
[-v]
- Request verbose logging
Sourcepub fn shell_command<S: Into<Cow<'a, str>>>(self, shell_command: S) -> Self
pub fn shell_command<S: Into<Cow<'a, str>>>(self, shell_command: S) -> Self
[-c shell-command]
- Execute shell-command using the default shell
Sourcepub fn file<S: Into<Cow<'a, str>>>(self, file: S) -> Self
pub fn file<S: Into<Cow<'a, str>>>(self, file: S) -> Self
[-f file]
- Specify an alternative configuration file
Sourcepub fn socket_name<S: Into<Cow<'a, str>>>(self, socket_name: S) -> Self
pub fn socket_name<S: Into<Cow<'a, str>>>(self, socket_name: S) -> Self
[-L socket-name]
- Allow a different socket name to be specified
Sourcepub fn socket_path<S: Into<Cow<'a, str>>>(self, socket_path: S) -> Self
pub fn socket_path<S: Into<Cow<'a, str>>>(self, socket_path: S) -> Self
[-S socket-path]
- Specify a full alternative path to the server socket
Sourcepub fn features<S: Into<Cow<'a, str>>>(self, features: S) -> Self
pub fn features<S: Into<Cow<'a, str>>>(self, features: S) -> Self
[-T features]
- Set terminal features for the client
Sourcepub fn command<T: Into<TmuxCommand<'a>>>(self, command: T) -> Self
pub fn command<T: Into<TmuxCommand<'a>>>(self, command: T) -> Self
[command]
pub fn build(self) -> TmuxCommand<'a>
pub fn into_command(self) -> Command
pub fn with_command<T: Into<TmuxCommand<'a>>>(command: T) -> Self
pub fn with_commands(commands: TmuxCommands<'a>) -> Self
pub fn add_command<T: Into<TmuxCommand<'a>>>(self, command: T) -> Self
pub fn commands(self, commands: TmuxCommands<'a>) -> Self
Source§impl<'a> Tmux<'a>
impl<'a> Tmux<'a>
Sourcepub fn output(self) -> Result<TmuxOutput, Error>
pub fn output(self) -> Result<TmuxOutput, Error>
execute tmux process, wait for output, return output
by default:
- stdin is inherited (differs from
std::process::Command
, where it is not inherited by default) prevents from immediately closing tmux after attempt to read from stdin - stdout is inherited
- stderr is inherited
Sourcepub fn spawn(self) -> Result<Child, Error>
pub fn spawn(self) -> Result<Child, Error>
spawn tmux process, return process handle as child by default:
- stdin is inherited
- stdout is inherited
- stderr is inherited
Sourcepub fn status(self) -> Result<ExitStatus, Error>
pub fn status(self) -> Result<ExitStatus, Error>
spawn tmux process, return status result of the command execution by default:
- stdin is inherited
- stdout is inherited
- stderr is inherited