pub enum Command {
Resume {
create: bool,
},
Start {
name: Option<String>,
program: Option<String>,
args: Vec<String>,
detached: bool,
},
Attach {
session: SessionSelector,
create: bool,
},
Select,
Detach {
session: Option<SessionSelector>,
},
Kill {
session: SessionSelector,
},
List {
info: bool,
json: bool,
},
Shutdown,
}
Variants§
Resume
Resume the last used session [alias: r]
Specify –create / -c to create a new session if one does not exist
Start
Start a new session, optionally specifying a name [alias: s]
If no program is specified, the default shell will be used. If no name is specified, the name will be [program name]-[n-1] where n is the number of sessions with that program name. If –detached / -d is present, the session will not be attached to the client on creation and will run in the background.
Attach
Attach to a session [alias: a]
Select a session by index or name. If –create / -c is present, a new session will be created if one does not exist. If the session was selected by name and the session was not present, the new session created by –create will have the specified name.
Fields
session: SessionSelector
Id or name of session
Select
Fuzzy select a session to attach to [alias: f]
Opens a fuzzy selection window provided by the dialoguer crate. Type to fuzzy find files, or use the Up/Down arrows to navigate. Press Enter to confirm your selection, or Escape to cancel.
Detach
Detach from a session [alias: d]
If no session is specified, detaches from the current session (if it exists). Otherwise, detaches the specified session from its owning client.
Fields
session: Option<SessionSelector>
Id or name of session
Kill
Kill a session [alias: k]
Kills a session and the process it owns. Select a session by name or index.
Fields
session: SessionSelector
Id or name of session
List
List sessions [alias: ls]
Prints a compact list of session names and indexes. With the –info / -i option, prints a nicely formatted table with info about each session.
Fields
Shutdown
Shutdown the server (kill all sessions)
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 subcommand