[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs can't capture fzf output in Windows 10

From: Eli Zaretskii
Subject: Re: Emacs can't capture fzf output in Windows 10
Date: Mon, 02 Mar 2020 10:42:54 +0200

> From: "Shuguang Sun" <>
> Date: Mon, 2 Mar 2020 12:25:48 +0800
> I'm trying to use fzf (junegunn/fzf) in windows, however it seems emacs can't 
> capture the output of fzf.
> Example:&nbsp; fzf with -filter will be in filter mode and do not start 
> interactive finder. 
> - In shell (cmd): "fzf.exe --filter=tmp" will not exit
> - In shell (cmd): "fzf.exe --filter=tmp &gt; aa.txt"&nbsp; will not exit
> - (call-process "cmd.exe" nil t nil "/C" "start" "fzf" "--filter=tmp") will 
> give a flash window (with list of findings) and print 0 in emacs.
> - (shell-command "fzf --filter=tmp") will lead to a message (Shell command 
> failed with code 1 and no output)
> - (shell-command-to-string "fzf --filter=tmp") give a empty string
> However if I run "fzf --filter=tmp" in the CMD box it will provide a list of 
> finding, and "fzf --filter=tmp &gt; aa.txt" will print the findings to file 
> aa.txt.
> It can't run fzf in interactive mode as I understand there is no true term 
> for emacs in windows but why it can't be run in filter mode?

It looks like fzf uses direct screen I/O?  If so, this won't work on
Windows when stdout is a pipe, which is what happens when Emacs on
Windows runs a subprocess.

I suggest to open an issue with fzf, and ask there whether it can run
with pipes as stdin/stdout.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]