From 882e130121b3c7bcba6ad2b0df10ddb189d472de Mon Sep 17 00:00:00 2001 From: Valerie Date: Fri, 8 Mar 2024 10:26:00 -0500 Subject: [PATCH] fixed tmux dispatch echoing command information --- src/command/share.rs | 7 +++---- src/util.rs | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/share.rs b/src/command/share.rs index 6b1e68e..e46150b 100644 --- a/src/command/share.rs +++ b/src/command/share.rs @@ -55,7 +55,7 @@ pub fn attach(pargs: &mut Arguments) { // build dispatch let mut tmux = Tmux::new().add_command(attach); if let Some(select_window) = select_window { tmux = tmux.add_command(select_window); } - tmux.output().ok(); + tmux.disable_echo().output().ok(); } pub fn detach(pargs: &mut Arguments) { @@ -77,7 +77,7 @@ pub fn detach(pargs: &mut Arguments) { .target_session(target); Tmux::new() .add_command(detach) - .output().ok(); + .disable_echo().output().ok(); } pub fn has(pargs: &mut Arguments) { @@ -168,7 +168,6 @@ pub fn new(pargs: &mut Arguments) { Tmux::new() .add_command(new) - - .output().ok(); + .disable_echo().output().ok(); } diff --git a/src/util.rs b/src/util.rs index c99302b..e8d8831 100644 --- a/src/util.rs +++ b/src/util.rs @@ -35,6 +35,7 @@ pub fn session_exists>(target: S) -> bool { let has_session = commands::HasSession::new() .target_session(target.into()); Tmux::new().add_command(has_session) + .disable_echo() .status() .unwrap() .success()