mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Add Relative Filepaths section for setting FZF_DEFAULT_COMMAND
14
Windows.md
14
Windows.md
@@ -6,6 +6,20 @@ flawlessly.
|
|||||||
[bin]: https://github.com/junegunn/fzf-bin/releases
|
[bin]: https://github.com/junegunn/fzf-bin/releases
|
||||||
[wsl]: https://blogs.msdn.microsoft.com/wsl/
|
[wsl]: https://blogs.msdn.microsoft.com/wsl/
|
||||||
|
|
||||||
|
### 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 cmd.exe because it is faster than powershell.exe:
|
||||||
|
|
||||||
|
- cmd.exe https://github.com/junegunn/fzf/pull/971#issuecomment-313971408
|
||||||
|
```dosbatch
|
||||||
|
cmd.exe /q/V:ON/c "for /f %A in ('dir /s/b 2^> nul') do set RELPATH=%A & echo !RELPATH:%cd%\=!"
|
||||||
|
```
|
||||||
|
- powershell https://github.com/junegunn/fzf/issues/960
|
||||||
|
```dosbatch
|
||||||
|
powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse -Name"
|
||||||
|
```
|
||||||
|
|
||||||
### PowerShell support
|
### PowerShell support
|
||||||
|
|
||||||
https://github.com/kelleyma49/PSFzf
|
https://github.com/kelleyma49/PSFzf
|
||||||
Reference in New Issue
Block a user