From af1164625416651ca977464a330c05ae9c8b0e49 Mon Sep 17 00:00:00 2001 From: Toby Padilla Date: Fri, 30 Jul 2021 12:47:52 -0500 Subject: [PATCH] Don't run the Bubble Tea program if there are ssh commands --- tui/model.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tui/model.go b/tui/model.go index e29f72f55..5cc2ba86d 100644 --- a/tui/model.go +++ b/tui/model.go @@ -25,11 +25,14 @@ func (e errMsg) Error() string { } func SessionHandler(s ssh.Session) tea.Model { - pty, changes, active := s.Pty() - if !active { - return nil + if len(s.Command()) == 0 { + pty, changes, active := s.Pty() + if !active { + return nil + } + return NewModel(pty.Window.Width, pty.Window.Height, changes) } - return NewModel(pty.Window.Width, pty.Window.Height, changes) + return nil } type Model struct {