From 4e612a2e92deddf3bdaef688e178c28f49276ccc Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 14 Nov 2023 16:09:09 -0500 Subject: [PATCH] use stdout fd for terminal size (#1125) --- cmd/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 5f2afb0d..9561b81c 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -398,7 +398,7 @@ func generate(cmd *cobra.Command, model, prompt string, wordWrap bool, format st generateContext = []int{} } - termWidth, _, err := term.GetSize(int(0)) + termWidth, _, err := term.GetSize(int(os.Stdout.Fd())) if err != nil { wordWrap = false }