From f84b3de24b63e2e26cbfa2a24e61a4173824fffd Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 25 Mar 2021 19:56:18 +0900 Subject: Automatically set /dev/tty as STDIN on execute action https://github.com/junegunn/fzf/issues/1360#issuecomment-788178140 # Redirect /dev/tty to suppress "Vim: Warning: Input is not from a terminal" ls | fzf --bind "enter:execute(vim {} < /dev/tty)" # With this change, we can omit "< /dev/tty" part ls | fzf --bind "enter:execute(vim {})" --- src/tui/ttyname_windows.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/tui/ttyname_windows.go') diff --git a/src/tui/ttyname_windows.go b/src/tui/ttyname_windows.go index 5354b747..8db490ad 100644 --- a/src/tui/ttyname_windows.go +++ b/src/tui/ttyname_windows.go @@ -2,6 +2,13 @@ package tui +import "os" + func ttyname() string { return "" } + +// TtyIn on Windows returns os.Stdin +func TtyIn() *os.File { + return os.Stdin +} -- cgit v1.2.3