##Description
A helper batch for fzf on Windows.
On Linux, the common practice for fzf is:
vim $(fzf)On Windows platform, we can use pipe to achieve same approach.
###Windows Prompt
- Download fzf binary from here and put it to
C:\windows. - Get
bin/with.batand put it toC:\windowstoo. - For msys/cygwin get
bin/winand put it to any localtion in$PATH.
-
by
with <app>, it will call file search function provided byfzfand pick the last selection and pass toappas parameter. -
by
wtihonly, it will callstart <param>which will do default open to the selection. -
by
<command> | with <app>you get the complete filter and execute function. -
For application which does not provide command line access directly, create a batch on
C:\windowsby following example below::: C:\Windows\typora.bat @echo off start "dummy" "C:\Program Files\Typora\Typora.exe" %*
Same as windows prompt but 2 limitations:
vimonly has 16 colors since it cannot be captured byconEmu. It may presents different withGvimand commonvimcallo.pipeis not usable(because ofwinpty).
The default file finder in fzf windows is dir /s /b. by using fd, you can get a decent improvement. For using it, just need to:
-
Get
fdbinary and put it toc:\windows. -
Modify
with.batto enable it::: Do FZF Setting Here set FZF_DEFAULT_COMMAND=fd -a -j 4
I don't know what is the root cause for this for now, but it is no impact to any functionality.
Make sure the location of script is in $PATH.
https://superuser.com/questions/343288/windows-batch-file-usebackq-quotes-within-quotes
https://stackoverflow.com/questions/3062100/piping-to-findstrs-input