m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Add 'Absolute filepaths' section for previous default command.

Jan Edmund Lazo
2018-01-17 16:32:46 +00:00
parent 50a8c5eb11
commit 1dbd3b3f1a

@@ -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"