pub enum Command {
Show 38 variants
Attach {
target: Option<String>,
},
Serve,
RuntimeKeeper {
keeper_socket: PathBuf,
cols: u16,
rows: u16,
pixel_width: u16,
pixel_height: u16,
cwd: Option<PathBuf>,
env: Vec<(String, OsString)>,
command: Vec<String>,
},
Automation {
target: Option<String>,
all_sessions: bool,
},
Ping {
payload: String,
},
KillServer,
NewSession {
name: Option<String>,
detached: bool,
attach_existing: bool,
session_name: Option<String>,
window_name: Option<String>,
cwd: Option<String>,
width: Option<u16>,
height: Option<u16>,
print: bool,
format: Option<String>,
command: Vec<String>,
},
ListSessions {
format: Option<String>,
},
HasSession {
target: String,
},
KillSession {
target: Option<String>,
force: bool,
detach: bool,
},
RenameSession {
target: Option<String>,
name: String,
},
ListBuffers {
target: Option<String>,
attached: bool,
detached: bool,
},
AttachBuffer {
buffer_id: u64,
target: Option<String>,
},
ListClients {
target: Option<String>,
format: Option<String>,
},
DetachClient {
client_id: Option<u64>,
client: Option<u64>,
},
SwitchClient {
client_id: Option<u64>,
client: Option<u64>,
target: Option<String>,
next: bool,
previous: bool,
},
Buffer {
command: BufferCommand,
},
Node {
command: NodeCommand,
},
NewWindow {
target: Option<String>,
title: Option<String>,
cwd: Option<String>,
detached: bool,
print: bool,
format: Option<String>,
command: Vec<String>,
},
ListWindows {
target: Option<String>,
all: bool,
format: Option<String>,
},
SelectWindow {
target: String,
},
RenameWindow {
target: Option<String>,
title: String,
},
KillWindow {
target: Option<String>,
detach: bool,
},
SplitWindow {
target: Option<String>,
side_by_side: bool,
stacked: bool,
horizontal: bool,
vertical: bool,
cwd: Option<String>,
detached: bool,
print: bool,
format: Option<String>,
help: Option<bool>,
command: Vec<String>,
},
ListPanes {
target: Option<String>,
session: bool,
all: bool,
format: Option<String>,
},
SelectPane {
target: Option<String>,
last: bool,
left: bool,
right: bool,
up: bool,
down: bool,
},
SetOption {
pane: bool,
window: bool,
server: bool,
global: bool,
target: Option<String>,
unset: bool,
only_if_unset: bool,
quiet: bool,
name: String,
value: Option<String>,
},
ShowOptions {
pane: bool,
window: bool,
server: bool,
global: bool,
target: Option<String>,
value_only: bool,
quiet: bool,
name: Option<String>,
},
ResizePane {
target: Option<String>,
sizes: Vec<u16>,
left: bool,
right: bool,
up: bool,
down: bool,
zoom: bool,
adjustment: Option<u16>,
},
SynchronizePanes {
target: Option<String>,
state: Option<SwitchArg>,
},
SendKeys {
target: Option<String>,
enter: bool,
keys: Vec<String>,
},
CapturePane {
target: Option<String>,
print: bool,
start: Option<LineBound>,
end: Option<LineBound>,
join: bool,
escapes: bool,
},
KillPane {
target: Option<String>,
detach: bool,
},
DisplayPopup {Show 14 fields
target: Option<String>,
title: Option<String>,
x: Option<PopupPosition>,
y: Option<PopupPosition>,
width: Option<PopupLength>,
height: Option<PopupLength>,
close_on_exit: u8,
cwd: Option<String>,
print: bool,
format: Option<String>,
no_wait: bool,
no_border: bool,
help: Option<bool>,
command: Vec<String>,
},
KillPopup {
target: Option<String>,
detach: bool,
},
DisplayMessage {
target: Option<String>,
client: Option<NonZeroU64>,
print: bool,
duration: Option<u32>,
message: Vec<String>,
},
SetEnvironment {
target: Option<String>,
global: bool,
unset: bool,
name: String,
value: Option<String>,
},
ShowEnvironment {
target: Option<String>,
global: bool,
name: Option<String>,
},
}Variants§
Attach
Serve
RuntimeKeeper
Fields
Automation
Ping
KillServer
Stop the server and end every program it runs. Unlike stopping the server with a signal, nothing is left for a restarted server to reattach to or restore.
NewSession
Create a session, like tmux new-session: with a first window running
COMMAND (or $SHELL) in -c DIR, attached unless -d. The old form,
new-session NAME, creates an empty session and prints its id and name.
Fields
ListSessions
HasSession
KillSession
Close a session and end the programs in its panes and popups.
Fields
RenameSession
ListBuffers
AttachBuffer
ListClients
Fields
DetachClient
Detach a client: -c, else the client the command runs for (see
switch-client).
SwitchClient
Show session -t on a client, like tmux. A window or pane target
(%3, work:2, work:2.1) also makes that window current and focuses
the pane. Without -c the client is the command prompt’s, else
EMBERS_CLIENT, else the one showing the session of the pane the
command runs in, else the only attached one. -n/-p move to the
next/previous session by name.
Buffer
Fields
command: BufferCommandNode
Fields
command: NodeCommandNewWindow
Add a window to session -t running COMMAND (or $SHELL) in -c DIR
(default: the current directory). Prints its number and title, or
with -P the format -F (default
#{session_name}:#{window_index}.#{pane_index}).
Fields
ListWindows
Fields
SelectWindow
RenameWindow
KillWindow
Close a window and end the programs in its panes.
SplitWindow
Split pane -t and run COMMAND (or $SHELL) in the new pane, in
-c DIR (default: the current directory). -h puts the new pane to
the right and -v below, like tmux; without either it goes to the
right. --horizontal (a horizontal divider) is -v, and --vertical
is -h. Prints the new pane’s id, or with -P the
format -F (default #{session_name}:#{window_index}.#{pane_index}).
Fields
ListPanes
Fields
SelectPane
Focus pane -t (default: the pane the command runs in, else the
focused one); with -L/-R/-U/-D the pane next to it on that side, as
the client’s focus actions find it; with -l the pane focused before
the current one in the session’s current window (tmux select-pane -l).
SetOption
Set pane -t’s option NAME to VALUE, like tmux set-option -p. Options
are the pane’s buffer options (buffer set-option): @name is the
option name, and remain-on-exit is the only other one. -u unsets
it, -o fails if it is set, -q ignores an unknown option. Windows,
sessions and the server have no options, so -p is required.
Fields
ShowOptions
Print pane -t’s options, or option NAME, like tmux show-options -p:
NAME VALUE lines, or with -v the values alone. -q prints nothing
for an option that is not set.
Fields
ResizePane
Resize a pane like tmux: -L/-R/-U/-D [N] moves its border N cells
(default 1), -Z toggles zoom, and --sizes sets the parent split’s
weights directly.
Fields
SynchronizePanes
Turn tmux-style synchronize-panes on or off for a window, or toggle it when no state is given. Prints the resulting state.
SendKeys
CapturePane
Print a pane’s text. With any of -p, -S, -E, -J or -e it works
like tmux capture-pane -p: the screen, or lines -S to -E (0 is the
screen’s first row, negative numbers are history, - is the start of
the history or the end of the screen), -J joining wrapped lines and
-e keeping colours and attributes as escape sequences. Without any,
it prints the whole history and screen as before.
Fields
KillPane
Close a pane and end its program.
DisplayPopup
Show COMMAND (or $SHELL) in a popup over pane -t’s session and,
like tmux run from a shell, wait until the popup closes, exiting with
the command’s status. --no-wait returns at once and prints the popup
id. Sizes and positions are cells or a percentage of the client’s view
(90%); positions also take C (centre) and, for -x, R (right).
The popup defaults to half the view, centred.
Fields
close_on_exit: u8Close when the command exits, as popups always do (-E); given
twice (-EE), only when it exits with status 0.
KillPopup
Close a popup and end the programs in it.
DisplayMessage
Show a message in the status line of the clients showing the target
pane’s session (or of client -c) for a few seconds, like tmux. -p
prints it instead. The message may use #S, #I, #W, #D, #T,
#{pane_current_path} and #{pane_current_command}.
Fields
client: Option<NonZeroU64>SetEnvironment
Set an environment variable for panes created later in a session, or in
every session with -g, like tmux. -u unsets it.
ShowEnvironment
Print a session’s environment (or the global one with -g) as
NAME=VALUE lines, or one variable when NAME is given.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.