diff --git a/src/main.rs b/src/main.rs index 39bba41..1f69e15 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,7 @@ use std::{ }; use tmux_interface::{ AttachSession, + commands::tmux::StdIO, HasSession, KillSession, ListClients, @@ -141,7 +142,7 @@ fn focus_project(projects : &BTreeMap, project_name : Option Tmux::new().add_command(SwitchClient::new().target_session(&session_name)).add_command(KillSession::new().target_session("PROJECTS")).status().unwrap().success(), + Ok(_) => Tmux::new().add_command(SwitchClient::new().target_session(&session_name)).add_command(KillSession::new().target_session("PROJECTS")).stderr(Some(StdIO::Null)).status().unwrap().success(), Err(_) => Tmux::with_command(AttachSession::new().target_session(&session_name)).status().unwrap().success(), }; } @@ -185,7 +186,7 @@ fn main() { set_projects(&project_file_path, &projects); match mode { - Mode::Delete => Tmux::with_command(KillSession::new().target_session(old_session_name)).status().unwrap().success(), + Mode::Delete => Tmux::with_command(KillSession::new().target_session(old_session_name)).stderr(Some(StdIO::Null)).status().unwrap().success(), _ => true, }; }