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 {