mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Make :GFiles work with "unusual" filenames (#1200)
git ls-files quotes file names containing "unusual" (non-ASCII?) characters by default, breaking :GFiles Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
@@ -618,9 +618,9 @@ function! fzf#vim#gitfiles(args, ...)
|
|||||||
let prefix = 'git -C ' . fzf#shellescape(root) . ' '
|
let prefix = 'git -C ' . fzf#shellescape(root) . ' '
|
||||||
if a:args != '?'
|
if a:args != '?'
|
||||||
return s:fzf('gfiles', {
|
return s:fzf('gfiles', {
|
||||||
\ 'source': prefix . 'ls-files '.a:args.(s:is_win ? '' : ' | uniq'),
|
\ 'source': prefix . 'ls-files -z --deduplicate',
|
||||||
\ 'dir': root,
|
\ 'dir': root,
|
||||||
\ 'options': '-m --prompt "GitFiles> "'
|
\ 'options': '-m --read0 --prompt "GitFiles> "'
|
||||||
\}, a:000)
|
\}, a:000)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user