pub struct SplitWindow<'a> {
Show 15 fields pub before: bool, pub detached: bool, pub full: bool, pub horizontal: bool, pub stdin_forward: bool, pub vertical: bool, pub print: bool, pub zoom: bool, pub start_directory: Option<Cow<'a, str>>, pub environment: Option<Cow<'a, str>>, pub size: Option<&'a PaneSize>, pub format: Option<Cow<'a, str>>, pub target_pane: Option<Cow<'a, str>>, pub target_window: Option<Cow<'a, str>>, pub shell_command: Option<Cow<'a, str>>,
}
Expand description

Create a new pane by splitting target-pane

§Manual

tmux ^3.2:

split-window [-bdfhIvPZ] [-c start-directory] [-e environment] [-l size] [-t target-pane]
[shell-command] [-F format]
(alias: splitw)

tmux ^3.1:

split-window [-bdfhIvP] [-c start-directory] [-e environment] [-l size] [-t target-pane]
[shell-command] [-F format]
(alias: splitw)

tmux ^3.0:

split-window [-bdfhIvP] [-c start-directory] [-e environment] [-l size | -p percentage]
[-t target-pane] [shell-command] [-F format]
(alias: splitw)

tmux ^2.4:

split-window [-bdfhvP] [-c start-directory] [-l size | -p percentage] [-t target-pane]
[shell-command] [-F format]
(alias: splitw)

tmux ^2.0:

split-window [-bdhvP] [-c start-directory] [-l size | -p percentage] [-t target-pane]
[shell-command] [-F format]
(alias: splitw)

tmux ^1.7:

split-window [-dhvP] [-c start-directory] [-l size | -p percentage] [-t target-pane]
[shell-command] [-F format]
(alias: splitw)

tmux ^1.5:

split-window [-dhvP] [-l size | -p percentage] [-t target-pane] [shell-command]
(alias: splitw)

tmux ^1.2:

split-window [-dhv] [-l size | -p percentage] [-t target-pane] [shell-command]
(alias: splitw)

tmux ^1.0:

split-window [-dhv] [-l size | -p percentage] [-t target-window] [command]
(alias: splitw)

tmux ^0.8:

split-window [-d] [-l size | -p percentage] [-t target-window] [command]
(alias: splitw)

Fields§

§before: bool

[-b] - cause the new pane to be created to the left of or above target-pane

§detached: bool

[-d] - do not make the new window the current window

§full: bool

[-f] - creates a new pane spanning the full window size (h, v)

§horizontal: bool

[-h] - horizontal split

§stdin_forward: bool

[-I] - create an empty pane and forward any output from stdin to it

§vertical: bool

[-v] - vertical split

§print: bool

[-P] - print information about the new window after it has been created

§zoom: bool

[-Z] - print information about the new window after it has been created

§start_directory: Option<Cow<'a, str>>

[-c start_directory] - start-directory

§environment: Option<Cow<'a, str>>

[-e environment] - environment

§size: Option<&'a PaneSize>

[-l size] - specify the size of the new pane in lines [-l size | -p percentage] - specify the size of the new pane in lines

§format: Option<Cow<'a, str>>

[-F format] - format

§target_pane: Option<Cow<'a, str>>

[-t target-pane] -

§target_window: Option<Cow<'a, str>>

[-t target-window] -

§shell_command: Option<Cow<'a, str>>

[shell-command] - shell-command

Implementations§

source§

impl<'a> SplitWindow<'a>

source

pub fn new() -> Self

source

pub fn before(self) -> Self

[-b] - cause the new pane to be created to the left of or above target-pane

source

pub fn detached(self) -> Self

[-d] - do not make the new window the current window

source

pub fn full(self) -> Self

[-f] - creates a new pane spanning the full window size (h, v)

source

pub fn horizontal(self) -> Self

[-h] - horizontal split

source

pub fn stdin_forward(self) -> Self

[-I] - create an empty pane and forward any output from stdin to it

source

pub fn vertical(self) -> Self

[-v] - vertical split

source

pub fn print(self) -> Self

[-P] - print information about the new window after it has been created

source

pub fn zoom(self) -> Self

[-Z] - zooms if the window is not zoomed, or keeps it zoomed if already zoomed

source

pub fn start_directory<S: Into<Cow<'a, str>>>(self, start_directory: S) -> Self

[-c start_directory] - start-directory

source

pub fn environment<S: Into<Cow<'a, str>>>(self, environment: S) -> Self

[-e environment] - environment

source

pub fn size(self, size: &'a PaneSize) -> Self

[-l size] - specify the size of the new pane in lines [-l size | -p percentage] - specify the size of the new pane in lines

source

pub fn target_pane<S: Into<Cow<'a, str>>>(self, target_pane: S) -> Self

[-t target-pane] -

source

pub fn format<S: Into<Cow<'a, str>>>(self, format: S) -> Self

[-F format] - format

source

pub fn target_window<S: Into<Cow<'a, str>>>(self, target_window: S) -> Self

[-t target-window] -

source

pub fn shell_command<S: Into<Cow<'a, str>>>(self, shell_command: S) -> Self

[shell-command] - shell-command

source

pub fn build(self) -> TmuxCommand<'a>

Trait Implementations§

source§

impl<'a> Clone for SplitWindow<'a>

source§

fn clone(&self) -> SplitWindow<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for SplitWindow<'a>

source§

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

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

impl<'a> Default for SplitWindow<'a>

source§

fn default() -> SplitWindow<'a>

Returns the “default value” for a type. Read more
source§

impl<'a> From<SplitWindow<'a>> for TmuxCommand<'a>

source§

fn from(item: SplitWindow<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> Hash for SplitWindow<'a>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a> Ord for SplitWindow<'a>

source§

fn cmp(&self, other: &SplitWindow<'a>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'a> PartialEq for SplitWindow<'a>

source§

fn eq(&self, other: &SplitWindow<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> PartialOrd for SplitWindow<'a>

source§

fn partial_cmp(&self, other: &SplitWindow<'a>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> Eq for SplitWindow<'a>

source§

impl<'a> StructuralPartialEq for SplitWindow<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for SplitWindow<'a>

§

impl<'a> Send for SplitWindow<'a>

§

impl<'a> Sync for SplitWindow<'a>

§

impl<'a> Unpin for SplitWindow<'a>

§

impl<'a> UnwindSafe for SplitWindow<'a>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.