/// Check to see how we want to open the project. Do we need to attach to a new
/// tmux session or can we switch the client from a running session.
///
/// # Examples
///
/// ```rust
/// extern crate load;
///
/// use load::command::{Attach, Commands, Command};
/// use load::project::open;
///
/// let correct_type = match open("muxed") {
///     Commands::Attach(_) => true,
///     _ => false,
/// };
///
/// assert!(correct_type)
/// ```
Check to see how we want to open the project. Do we need to attach to a new
tmux session or can we switch the client from a running session.
Check to see how we want to open the project . Do we need to attach to a new tmux session or can we switch the client from a running session .
pub fn open(project_name: &str) -> Commands {
    if env::var_os(TMUX_ENV_VAR).is_some() {
        SwitchClient::new(&project_name).into()
    } else {
        Attach::new(&project_name, None).into()
    }
}
pub fn open ( project_name : & str ) -> Commands { if env :: var_os ( TMUX_ENV_VAR ) . is_some ( ) { SwitchClient :: new ( & project_name ) . into ( ) } else { Attach :: new ( & project_name , None ) . into ( ) } }
Check to see how we want to open the project.
Check to see how we want to open the project .
project_name
&str
examples
```rust
extern crate load.

use load::command::{Attach, Commands, Command};
use load::project::open.

let correct_type = match open("muxed") {
Commands::Attach(_) => true,
_ => false,
}.

assert!(correct_type)
```
` ` ` rust extern crate load . use load :: command :: { Attach Commands Command } ; use load :: project :: open . let correct_type = match open ( " muxed " ) { Commands :: Attach ( _ ) = > true _ = > false } . assert! ( correct_type ) ` ` `