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.
13
Windows.md
13
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`.
|
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
|
### Relative Filepaths
|
||||||
|
|
||||||
fzf uses `dir /s/b` as its default command for performance but it outputs absolute filepaths.
|
If not using cmd.exe builtins, take note of https://github.com/golang/go/issues/17608. fzf does not cleanup child processes on Windows.
|
||||||
To use relative filepaths, set `FZF_DEFAULT_COMMAND` to any of the following and run it in cmd.exe because it has no overhead:
|
|
||||||
|
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
|
- powershell https://github.com/junegunn/fzf/issues/960
|
||||||
```dosbatch
|
```dosbatch
|
||||||
powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse -Name"
|
powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse -Name"
|
||||||
|
|||||||
Reference in New Issue
Block a user