pub struct AttachSession<'a> {
pub detach_other: bool,
pub not_update_env: bool,
pub read_only: bool,
pub parent_sighup: bool,
pub working_directory: Option<Cow<'a, str>>,
pub flags: Option<ClientFlags>,
pub target_session: Option<Cow<'a, str>>,
}
Expand description
Structure for attaching client to already existing session
§Manual
tmux ^3.2:
attach-session [-dErx] [-c working-directory] [-f flags] [-t target-session]
(alias: attach)
tmux ^3.0:
attach-session [-dErx] [-c working-directory] [-t target-session]
(alias: attach)
tmux ^2.1:
attach-session [-dEr] [-c working-directory] [-t target-session]
(alias: attach)
tmux ^1.9:
attach-session [-dr] [-c working-directory] [-t target-session]
(alias: attach)
tmux ^1.2:
attach-session [-dr] [-t target-session]
(alias: attach)
tmux ^0.8:
attach-session [-d] [-t target-session]
(alias: attach)
Fields§
§detach_other: bool
[-d]
- any other clients attached to the session are detached
not_update_env: bool
[-E]
- update-environment
option will not be applied
read_only: bool
[-r]
- signifies the client is read-only
parent_sighup: bool
[-x]
- send SIGHUP to the parent process, detaching the client
working_directory: Option<Cow<'a, str>>
[-c working-directory]
- specify starting directory
flags: Option<ClientFlags>
[-f flags]
- sets a comma-separated list of client flags
target_session: Option<Cow<'a, str>>
[-t target-session]
- specify target session name
Implementations§
source§impl<'a> AttachSession<'a>
impl<'a> AttachSession<'a>
pub fn new() -> Self
sourcepub fn detach_other(self) -> Self
pub fn detach_other(self) -> Self
[-d]
- any other clients attached to the session are detached
sourcepub fn not_update_env(self) -> Self
pub fn not_update_env(self) -> Self
[-E]
- update-environment
option will not be applied
sourcepub fn parent_sighup(self) -> Self
pub fn parent_sighup(self) -> Self
[-x]
- send SIGHUP to the parent process, detaching the client
sourcepub fn working_directory<S: Into<Cow<'a, str>>>(
self,
working_directory: S
) -> Self
pub fn working_directory<S: Into<Cow<'a, str>>>( self, working_directory: S ) -> Self
[-c working-directory]
- specify starting directory
sourcepub fn flags(self, flags: ClientFlags) -> Self
pub fn flags(self, flags: ClientFlags) -> Self
[-f flags]
- sets a comma-separated list of client flags
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 target session name
sourcepub fn build(self) -> TmuxCommand<'a>
pub fn build(self) -> TmuxCommand<'a>
build command with arguments in right order
Trait Implementations§
source§impl<'a> Clone for AttachSession<'a>
impl<'a> Clone for AttachSession<'a>
source§fn clone(&self) -> AttachSession<'a>
fn clone(&self) -> AttachSession<'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 AttachSession<'a>
impl<'a> Debug for AttachSession<'a>
source§impl<'a> Default for AttachSession<'a>
impl<'a> Default for AttachSession<'a>
source§fn default() -> AttachSession<'a>
fn default() -> AttachSession<'a>
source§impl<'a> From<AttachSession<'a>> for TmuxCommand<'a>
impl<'a> From<AttachSession<'a>> for TmuxCommand<'a>
source§fn from(item: AttachSession<'a>) -> Self
fn from(item: AttachSession<'a>) -> Self
source§impl<'a> Hash for AttachSession<'a>
impl<'a> Hash for AttachSession<'a>
source§impl<'a> Ord for AttachSession<'a>
impl<'a> Ord for AttachSession<'a>
source§fn cmp(&self, other: &AttachSession<'a>) -> Ordering
fn cmp(&self, other: &AttachSession<'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 AttachSession<'a>
impl<'a> PartialEq for AttachSession<'a>
source§fn eq(&self, other: &AttachSession<'a>) -> bool
fn eq(&self, other: &AttachSession<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for AttachSession<'a>
impl<'a> PartialOrd for AttachSession<'a>
source§fn partial_cmp(&self, other: &AttachSession<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &AttachSession<'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