diff --git a/go.mod b/go.mod index 932e7c39e..f4ac6308b 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.16 replace github.com/charmbracelet/charm => ../charm +replace github.com/charmbracelet/bubbletea => ../bubbletea + require ( github.com/charmbracelet/bubbletea v0.14.0 github.com/charmbracelet/charm v0.8.6 diff --git a/go.sum b/go.sum index 66e43f9de..091077d2c 100644 --- a/go.sum +++ b/go.sum @@ -26,6 +26,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/console v1.0.1 h1:u7SFAJyRqWcG6ogaMAx3KjSTy1e3hT9QxqX7Jco7dRc= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= diff --git a/server.go b/server.go index 7ebaeb48a..efbaed003 100644 --- a/server.go +++ b/server.go @@ -55,7 +55,7 @@ func (srv *Server) sessionHandler(s ssh.Session) { return } if m != nil { - p := tea.NewProgram(m, tea.WithInput(s), tea.WithOutput(s)) + p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithInput(s), tea.WithOutput(s)) err = p.Start() if err != nil { log.Printf("%s error %v %s\n", s.RemoteAddr().String(), hpk, err)