fixed tmux dispatch echoing command information

This commit is contained in:
Valerie Wolfe 2024-03-08 10:26:00 -05:00
parent 41a64f039f
commit 882e130121
2 changed files with 4 additions and 4 deletions

View file

@ -55,7 +55,7 @@ pub fn attach(pargs: &mut Arguments) {
// build dispatch // build dispatch
let mut tmux = Tmux::new().add_command(attach); let mut tmux = Tmux::new().add_command(attach);
if let Some(select_window) = select_window { tmux = tmux.add_command(select_window); } 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) { pub fn detach(pargs: &mut Arguments) {
@ -77,7 +77,7 @@ pub fn detach(pargs: &mut Arguments) {
.target_session(target); .target_session(target);
Tmux::new() Tmux::new()
.add_command(detach) .add_command(detach)
.output().ok(); .disable_echo().output().ok();
} }
pub fn has(pargs: &mut Arguments) { pub fn has(pargs: &mut Arguments) {
@ -168,7 +168,6 @@ pub fn new(pargs: &mut Arguments) {
Tmux::new() Tmux::new()
.add_command(new) .add_command(new)
.disable_echo().output().ok();
.output().ok();
} }

View file

@ -35,6 +35,7 @@ pub fn session_exists<S: Into<String>>(target: S) -> bool {
let has_session = commands::HasSession::new() let has_session = commands::HasSession::new()
.target_session(target.into()); .target_session(target.into());
Tmux::new().add_command(has_session) Tmux::new().add_command(has_session)
.disable_echo()
.status() .status()
.unwrap() .unwrap()
.success() .success()