feat: Stop <session_name> does not exist outputs
This commit is contained in:
parent
5d290517ee
commit
e8911fc002
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
use skim::prelude::*;
|
||||
use std::{collections::BTreeMap, io::Cursor};
|
||||
use tmux_interface::{AttachSession, HasSession, NewSession, SwitchClient, Tmux};
|
||||
use tmux_interface::{
|
||||
commands::tmux::StdIO, AttachSession, HasSession, NewSession, SwitchClient, Tmux,
|
||||
};
|
||||
|
||||
pub fn add_project(
|
||||
projects: &mut BTreeMap<String, String>,
|
||||
|
@ -80,6 +82,7 @@ pub fn focus_project(projects: &BTreeMap<String, String>, project_name: Option<S
|
|||
};
|
||||
|
||||
let has_session = Tmux::with_command(HasSession::new().target_session(&session_name))
|
||||
.stderr(Some(StdIO::Null))
|
||||
.status()
|
||||
.unwrap()
|
||||
.success();
|
||||
|
|
Loading…
Reference in a new issue