From 742d340eaa8bd93f6814a1dd375a22152f4404ad Mon Sep 17 00:00:00 2001 From: sinner Date: Thu, 7 May 2026 23:00:27 +0000 Subject: feat: add stdin support and output redirection for batch queries across all commands --- internal/utils/tty_windows.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 internal/utils/tty_windows.go (limited to 'internal/utils/tty_windows.go') diff --git a/internal/utils/tty_windows.go b/internal/utils/tty_windows.go new file mode 100644 index 0000000..f40dbda --- /dev/null +++ b/internal/utils/tty_windows.go @@ -0,0 +1,13 @@ +//go:build windows + +package utils + +import "os" + +func OpenTTY() (*os.File, error) { + conin, err := os.OpenFile("CONIN$", os.O_RDWR, 0) + if err != nil { + return nil, err + } + return conin, nil +} -- cgit v1.2.3