1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use crate::TmuxCommand;

#[cfg(feature = "tmux_1_0")]
use crate::{SetEnvironment, ShowEnvironment};

/// All functions from man tmux "Global and session environment" listed below
/// ([man tmux](http://man7.org/linux/man-pages/man1/tmux.1.html#GLOBAL_AND_SESSION_ENVIRONMENT))
#[cfg(feature = "tmux_1_0")]
pub mod set_environment;
#[cfg(feature = "tmux_1_0")]
pub mod show_environment;

#[cfg(feature = "tmux_1_0")]
pub mod set_environment_tests;
#[cfg(feature = "tmux_1_0")]
pub mod show_environment_tests;

/// All functions from man tmux "Global and session environment" listed below
/// ([man tmux](http://man7.org/linux/man-pages/man1/tmux.1.html#GLOBAL_AND_SESSION_ENVIRONMENT))
impl<'a> TmuxCommand<'a> {
    #[cfg(feature = "tmux_1_0")]
    pub fn set_environment(&self) -> SetEnvironment<'a> {
        SetEnvironment::from(self)
    }

    #[cfg(feature = "tmux_1_0")]
    pub fn show_environment(&self) -> ShowEnvironment<'a> {
        ShowEnvironment::from(self)
    }
}