[GFiles?] include all untracked files (#222)

By default git-status won't include new files in new directories.

E.g.

    foo/bar/baz.txt # "baz.txt" is a new file in a new directory "bar".

    $ git status --short
    ?? foo/bar/
This commit is contained in:
Odin Dutton
2016-10-17 00:24:38 +11:00
committed by Junegunn Choi
parent e198586037
commit 47d4655bd8

View File

@@ -420,7 +420,7 @@ function! fzf#vim#gitfiles(args, ...)
" We're trying to access the common sink function that fzf#wrap injects to
" the options dictionary.
let wrapped = fzf#wrap({
\ 'source': 'git -c color.status=always status --short',
\ 'source': 'git -c color.status=always status --short --untracked-files=all',
\ 'dir': root,
\ 'options': '--ansi --multi --nth 2..,.. --prompt "GitFiles?> " --preview ''(git diff --color=always -- {-1} | sed 1,4d; cat {-1}) | head -500'''
\})