Skip to content

Commit

Permalink
plug: restore FZF_DEFAULT_COMMAND on Windows
Browse files Browse the repository at this point in the history
fzf uses https://github.com/saracen/walker on Windows since v0.21.0
but it does not work on directory symlinks and junctions.
I use directory junctions a lot.
I prefer a list of files by default over nothing.

junegunn/fzf#1847 (comment)
https://github.com/saracen/walker/blob/324a081bae7e580aa0bf3afe8164acb16634afca/walker.go#L85
  • Loading branch information
janlazo committed May 15, 2020
1 parent 2d7774e commit 108c497
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared.vim
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ if has('win32')
" Default prompt is not user-friendly.
" ConEmu's prompt is garbled in winpty.
let $PROMPT = '$P$_$G$S'

" fzf default file walker does not work on directory symlinks and junctions
" https://github.com/junegunn/fzf/pull/1847#issuecomment-628960827
let $FZF_DEFAULT_COMMAND = 'for /r %P in (*) do @(set "_curfile=%P" & set "_curfile=!_curfile:%__CD__%=!" & echo !_curfile!)'
endif

" {{{tiny
Expand Down

0 comments on commit 108c497

Please sign in to comment.