Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 36 variants Attach { target: Option<String>, }, Serve, RuntimeKeeper { keeper_socket: PathBuf, cols: u16, rows: u16, cwd: Option<PathBuf>, env: Vec<(String, OsString)>, command: Vec<String>, }, Automation { target: Option<String>, all_sessions: bool, }, Ping { payload: String, }, KillServer, NewSession { name: String, }, ListSessions, 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, DetachClient { client_id: Option<u64>, }, SwitchClient { client_id: Option<u64>, target: String, }, Buffer { command: BufferCommand, }, Node { command: NodeCommand, }, NewWindow { target: Option<String>, title: Option<String>, command: Vec<String>, }, ListWindows { target: Option<String>, }, SelectWindow { target: String, }, RenameWindow { target: Option<String>, title: String, }, KillWindow { target: Option<String>, detach: bool, }, SplitWindow { target: Option<String>, horizontal: bool, vertical: bool, command: Vec<String>, }, ListPanes { target: Option<String>, }, SelectPane { target: Option<String>, last: bool, }, 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>, }, KillPane { target: Option<String>, detach: bool, }, DisplayPopup { target: Option<String>, title: Option<String>, x: u16, y: u16, width: u16, height: u16, 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

Fields

§target: Option<String>
§

Serve

§

RuntimeKeeper

Fields

§keeper_socket: PathBuf
§cols: u16
§rows: u16
§command: Vec<String>
§

Automation

Fields

§target: Option<String>
§all_sessions: bool
§

Ping

Fields

§payload: String
§

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

Fields

§name: String
§

ListSessions

§

HasSession

Fields

§target: String
§

KillSession

Close a session and end the programs in its panes and popups.

Fields

§target: Option<String>
§force: bool
§detach: bool

Keep the programs running as detached buffers instead.

§

RenameSession

Fields

§target: Option<String>
§name: String
§

ListBuffers

Fields

§target: Option<String>
§attached: bool
§detached: bool
§

AttachBuffer

Fields

§buffer_id: u64
§target: Option<String>
§

ListClients

§

DetachClient

Detach a client. From the command prompt the client defaults to the one the prompt belongs to.

Fields

§client_id: Option<u64>
§

SwitchClient

Show session -t on a client. From the command prompt the client defaults to the one the prompt belongs to.

Fields

§client_id: Option<u64>
§target: String
§

Buffer

Fields

§

Node

Fields

§command: NodeCommand
§

NewWindow

Fields

§target: Option<String>
§command: Vec<String>
§

ListWindows

Fields

§target: Option<String>
§

SelectWindow

Fields

§target: String
§

RenameWindow

Fields

§target: Option<String>
§title: String
§

KillWindow

Close a window and end the programs in its panes.

Fields

§target: Option<String>
§detach: bool

Keep the programs running as detached buffers instead.

§

SplitWindow

Fields

§target: Option<String>
§horizontal: bool
§vertical: bool
§command: Vec<String>
§

ListPanes

Fields

§target: Option<String>
§

SelectPane

Focus a pane, or with -l the pane focused before the current one in the session’s current window (tmux select-pane -l).

Fields

§target: Option<String>
§last: bool
§

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

§target: Option<String>
§sizes: Vec<u16>
§left: bool
§right: bool
§up: bool
§down: bool
§zoom: bool
§adjustment: Option<u16>
§

SynchronizePanes

Turn tmux-style synchronize-panes on or off for a window, or toggle it when no state is given. Prints the resulting state.

Fields

§target: Option<String>
§

SendKeys

Fields

§target: Option<String>
§enter: bool
§keys: Vec<String>
§

CapturePane

Fields

§target: Option<String>
§

KillPane

Close a pane and end its program.

Fields

§target: Option<String>
§detach: bool

Keep the program running as a detached buffer instead.

§

DisplayPopup

Fields

§target: Option<String>
§width: u16
§height: u16
§command: Vec<String>
§

KillPopup

Close a popup and end the programs in it.

Fields

§target: Option<String>
§detach: bool

Keep the programs running as detached buffers instead.

§

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

§target: Option<String>
§print: bool
§duration: Option<u32>

How long to show the message, in milliseconds.

§message: Vec<String>
§

SetEnvironment

Set an environment variable for panes created later in a session, or in every session with -g, like tmux. -u unsets it.

Fields

§target: Option<String>
§global: bool
§unset: bool
§name: String
§

ShowEnvironment

Print a session’s environment (or the global one with -g) as NAME=VALUE lines, or one variable when NAME is given.

Fields

§target: Option<String>
§global: bool

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more