From 1dbd3b3f1ad8c2dc09e961521809686d923b8b88 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 17 Jan 2018 16:32:46 +0000 Subject: [PATCH] Add 'Absolute filepaths' section for previous default command. --- Windows.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Windows.md b/Windows.md index ad90ce5..af5a526 100644 --- a/Windows.md +++ b/Windows.md @@ -21,17 +21,16 @@ Windows binary does not support `--height` option which is used to start fzf in Even if you're on Cygwin, fzf will use `cmd.exe` (instead of `sh`) to start `FZF_DEFAULT_COMMAND`. -### +### Absolute Filepaths + +Set `FZF_DEFAULT_COMMAND` to `dir /s/b`. This is fzf's default command before https://github.com/junegunn/fzf/pull/1200. ### Relative Filepaths -fzf uses `dir /s/b` as its default command for performance but it outputs absolute filepaths. -To use relative filepaths, set `FZF_DEFAULT_COMMAND` to any of the following and run it in cmd.exe because it has no overhead: +If not using cmd.exe builtins, take note of https://github.com/golang/go/issues/17608. fzf does not cleanup child processes on Windows. + +Set `FZF_DEFAULT_COMMAND` to any of the following: -- cmd.exe https://github.com/junegunn/fzf/pull/1200 - ```dosbatch - cmd.exe /v:on/s/c "for /r %P in (*) do @(set "_curfile=%P" & set "_curfile=!_curfile:%__cd__%=!" & echo !_curfile!)" - ``` - powershell https://github.com/junegunn/fzf/issues/960 ```dosbatch powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse -Name"