pub struct SwitchClient<'a> {
pub not_update_env: bool,
pub last_session: bool,
pub next_session: bool,
pub previous_session: bool,
pub read_only: bool,
pub keep_zoomed: bool,
pub target_client: Option<Cow<'a, str>>,
pub target_session: Option<Cow<'a, str>>,
pub key_table: Option<Cow<'a, str>>,
/* private fields */
}
Expand description
Structure to switch the current session for client target-client
to target-session
§Manual
tmux ^3.1:
switch-client [-ElnprZ] [-c target-client] [-t target-session] [-T key-table]
(alias: switchc)
tmux ^2.1:
switch-client [-Elnpr] [-c target-client] [-t target-session] [-T key-table]
(alias: switchc)
tmux ^1.6:
switch-client [-lnpr] [-c target-client] [-t target-session]
(alias: switchc)
tmux ^1.4:
switch-client [-lnp] [-c target-client] [-t target-session]
(alias: switchc)
tmux ^1.0:
switch-client [-c target-client] [-t target-session]
(alias: switchc)
tmux ^0.8:
switch-client [-c target-client -t target-session]
(alias: switchc)
Fields§
§not_update_env: bool
[-E]
- update-environment option will not be applied
last_session: bool
[-l]
- move to the last session
next_session: bool
[-n]
- move to the next session
previous_session: bool
[-p]
- move to the previous session
read_only: bool
[-r]
- toggle whether a client is read-only
keep_zoomed: bool
[-Z]
- keep the window zoomed if it was zoomed
target_client: Option<Cow<'a, str>>
[-c target-client]
- specify the target-client
target_session: Option<Cow<'a, str>>
[-t target-session]
- specify the target session
key_table: Option<Cow<'a, str>>
[-T key-table]
- set the client’s key table
Implementations§
source§impl<'a> SwitchClient<'a>
impl<'a> SwitchClient<'a>
pub fn new() -> Self
sourcepub fn not_update_env(self) -> Self
pub fn not_update_env(self) -> Self
[-E]
- update-environment option will not be applied
sourcepub fn last_session(self) -> Self
pub fn last_session(self) -> Self
[-l]
- move to the last session
sourcepub fn next_session(self) -> Self
pub fn next_session(self) -> Self
[-n]
- move to the next session
sourcepub fn previous_session(self) -> Self
pub fn previous_session(self) -> Self
[-p]
- move to the previous session
sourcepub fn keep_zoomed(self) -> Self
pub fn keep_zoomed(self) -> Self
[-Z]
- keep the window zoomed if it was zoomed
sourcepub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
pub fn target_client<S: Into<Cow<'a, str>>>(self, target_client: S) -> Self
[-c target-client]
- specify the target-client
sourcepub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
pub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
[-t target-session]
- specify the target session
sourcepub fn key_table<S: Into<Cow<'a, str>>>(self, key_table: S) -> Self
pub fn key_table<S: Into<Cow<'a, str>>>(self, key_table: S) -> Self
[-T key-table]
- set the client’s key table
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
source§impl<'a> Clone for SwitchClient<'a>
impl<'a> Clone for SwitchClient<'a>
source§fn clone(&self) -> SwitchClient<'a>
fn clone(&self) -> SwitchClient<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for SwitchClient<'a>
impl<'a> Debug for SwitchClient<'a>
source§impl<'a> Default for SwitchClient<'a>
impl<'a> Default for SwitchClient<'a>
source§fn default() -> SwitchClient<'a>
fn default() -> SwitchClient<'a>
source§impl<'a> From<SwitchClient<'a>> for TmuxCommand<'a>
impl<'a> From<SwitchClient<'a>> for TmuxCommand<'a>
source§fn from(item: SwitchClient<'a>) -> Self
fn from(item: SwitchClient<'a>) -> Self
source§impl<'a> Hash for SwitchClient<'a>
impl<'a> Hash for SwitchClient<'a>
source§impl<'a> Ord for SwitchClient<'a>
impl<'a> Ord for SwitchClient<'a>
source§fn cmp(&self, other: &SwitchClient<'a>) -> Ordering
fn cmp(&self, other: &SwitchClient<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<'a> PartialEq for SwitchClient<'a>
impl<'a> PartialEq for SwitchClient<'a>
source§fn eq(&self, other: &SwitchClient<'a>) -> bool
fn eq(&self, other: &SwitchClient<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for SwitchClient<'a>
impl<'a> PartialOrd for SwitchClient<'a>
source§fn partial_cmp(&self, other: &SwitchClient<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &SwitchClient<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more