From 3dee8778d073199e0fe1e186e54f7eabc2fdef43 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 23 May 2024 20:08:20 +0900 Subject: execute: Open separate handles to /dev/tty (in, out, err) # This will no longer cause 'Vim: Warning: Output is not to a terminal' fzf --bind 'enter:execute:vim {}' > /tmp/foo --- src/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/reader.go') diff --git a/src/reader.go b/src/reader.go index 99a609e2..83912df5 100644 --- a/src/reader.go +++ b/src/reader.go @@ -113,7 +113,7 @@ func (r *Reader) ReadSource(inputChan chan string, root string, opts walkerOpts, var success bool if inputChan != nil { success = r.readChannel(inputChan) - } else if util.IsTty() { + } else if util.IsTty(os.Stdin) { cmd := os.Getenv("FZF_DEFAULT_COMMAND") if len(cmd) == 0 { success = r.readFiles(root, opts, ignores) -- cgit v1.2.3