From 83cc77784a4dc61ff45478425b070363e5dfc4ac Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 4 Jan 2024 22:06:03 -0300 Subject: [PATCH] fix: pty Co-authored-by: Ayman Bagabas Signed-off-by: Carlos Alexandro Becker --- bubbletea/tea.go | 3 +-- examples/go.mod | 2 +- examples/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bubbletea/tea.go b/bubbletea/tea.go index d6b8584..828c7f1 100644 --- a/bubbletea/tea.go +++ b/bubbletea/tea.go @@ -56,8 +56,7 @@ func Middleware(bth Handler) wish.Middleware { upty, ok := tty.Pty.(pty.UnixPty) if ok { f := upty.Slave() - out := termenv.NewOutput(f, termenv.WithColorCache(true)) - opts = []tea.ProgramOption{tea.WithInput(f), tea.WithOutput(out)} + opts = []tea.ProgramOption{tea.WithInput(f), tea.WithOutput(f)} } renderer := lipgloss.NewRenderer(tty, termenv.WithColorCache(true)) diff --git a/examples/go.mod b/examples/go.mod index 3cb3b58..a6ee948 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -7,7 +7,7 @@ require ( github.com/charmbracelet/bubbletea v0.25.0 github.com/charmbracelet/lipgloss v0.9.1 github.com/charmbracelet/log v0.3.1 - github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249 + github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159 github.com/charmbracelet/wish v0.5.0 github.com/muesli/termenv v0.15.2 github.com/spf13/cobra v1.7.0 diff --git a/examples/go.sum b/examples/go.sum index 1b2550c..66238cf 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -25,8 +25,8 @@ github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1 github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/charmbracelet/log v0.3.1 h1:TjuY4OBNbxmHWSwO3tosgqs5I3biyY8sQPny/eCMTYw= github.com/charmbracelet/log v0.3.1/go.mod h1:OR4E1hutLsax3ZKpXbgUqPtTjQfrh1pG3zwHGWuuq8g= -github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249 h1:M1Q/UIbi9Cfla0HK3A9puhQhb8ZPkA5HQxeSYcVrGpo= -github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249/go.mod h1:A1H384KV/cJcSKofWjdSIb+dfbikXiW6449EluL3qJI= +github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159 h1:JgPRzCH5Uyi2y/Zgb+XmVTnowqRb8tN8TcBCVJdfPYI= +github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159/go.mod h1:2B8b7QeevR8cn/lLB3j/Q1qo9FO/7eC1NH9RG+lfii0= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= diff --git a/go.mod b/go.mod index 0c50e91..d665359 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/charmbracelet/keygen v0.5.0 github.com/charmbracelet/lipgloss v0.9.1 github.com/charmbracelet/log v0.3.1 - github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249 + github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159 github.com/go-git/go-git/v5 v5.11.0 github.com/google/go-cmp v0.6.0 github.com/hashicorp/golang-lru/v2 v2.0.7 diff --git a/go.sum b/go.sum index 8cc01fd..a124b5a 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1 github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/charmbracelet/log v0.3.1 h1:TjuY4OBNbxmHWSwO3tosgqs5I3biyY8sQPny/eCMTYw= github.com/charmbracelet/log v0.3.1/go.mod h1:OR4E1hutLsax3ZKpXbgUqPtTjQfrh1pG3zwHGWuuq8g= -github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249 h1:M1Q/UIbi9Cfla0HK3A9puhQhb8ZPkA5HQxeSYcVrGpo= -github.com/charmbracelet/ssh v0.0.0-20240104172912-e11ae277b249/go.mod h1:A1H384KV/cJcSKofWjdSIb+dfbikXiW6449EluL3qJI= +github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159 h1:JgPRzCH5Uyi2y/Zgb+XmVTnowqRb8tN8TcBCVJdfPYI= +github.com/charmbracelet/ssh v0.0.0-20240105010023-df1b8bf5b159/go.mod h1:2B8b7QeevR8cn/lLB3j/Q1qo9FO/7eC1NH9RG+lfii0= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY=