diff --git a/README.md b/README.md index 8f7f44b..ede362b 100644 --- a/README.md +++ b/README.md @@ -48,31 +48,31 @@ Plug 'junegunn/fzf.vim' Commands -------- -| Command | List | -| --- | --- | -| `Files [PATH]` | Files (similar to `:FZF`) | -| `GitFiles` | Git files (git ls-files) | -| `GitFiles?` | Git files (git status) | -| `Buffers` | Open buffers | -| `Colors` | Color schemes | -| `Ag [PATTERN]` | [ag][ag] search result (`ALT-A` to select all, `ALT-D` to deselect all) | -| `Lines [QUERY]` | Lines in loaded buffers | -| `BLines [QUERY]` | Lines in the current buffer | -| `Tags [QUERY]` | Tags in the project (`ctags -R`) | -| `BTags [QUERY]` | Tags in the current buffer | -| `Marks` | Marks | -| `Windows` | Windows | -| `Locate PATTERN` | `locate` command output | -| `History` | `v:oldfiles` and open buffers | -| `History:` | Command history | -| `History/` | Search history | -| `Snippets` | Snippets ([UltiSnips][us]) | -| `Commits` | Git commits (requires [fugitive.vim][f]) | -| `BCommits` | Git commits for the current buffer | -| `Commands` | Commands | -| `Maps` | Normal mode mappings | -| `Helptags` | Help tags [1](#helptags) | -| `Filetypes` | File types +| Command | List | +| --- | --- | +| `Files [PATH]` | Files (similar to `:FZF`) | +| `GitFiles [OPTS]` | Git files (git ls-files) | +| `GitFiles?` | Git files (git status) | +| `Buffers` | Open buffers | +| `Colors` | Color schemes | +| `Ag [PATTERN]` | [ag][ag] search result (`ALT-A` to select all, `ALT-D` to deselect all) | +| `Lines [QUERY]` | Lines in loaded buffers | +| `BLines [QUERY]` | Lines in the current buffer | +| `Tags [QUERY]` | Tags in the project (`ctags -R`) | +| `BTags [QUERY]` | Tags in the current buffer | +| `Marks` | Marks | +| `Windows` | Windows | +| `Locate PATTERN` | `locate` command output | +| `History` | `v:oldfiles` and open buffers | +| `History:` | Command history | +| `History/` | Search history | +| `Snippets` | Snippets ([UltiSnips][us]) | +| `Commits` | Git commits (requires [fugitive.vim][f]) | +| `BCommits` | Git commits for the current buffer | +| `Commands` | Commands | +| `Maps` | Normal mode mappings | +| `Helptags` | Help tags [1](#helptags) | +| `Filetypes` | File types - Most commands support `CTRL-T` / `CTRL-X` / `CTRL-V` key bindings to open in a new tab, a new split, or in a new vertical split diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index bd0c91f..7277fce 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -409,9 +409,9 @@ function! fzf#vim#gitfiles(args, ...) if v:shell_error return s:warn('Not in git repo') endif - if a:args !~ '^?' + if a:args != '?' return s:fzf(fzf#vim#wrap({ - \ 'source': 'git ls-files', + \ 'source': 'git ls-files '.a:args, \ 'dir': root, \ 'options': '-m --prompt "GitFiles> "' \}), a:000) diff --git a/doc/fzf-vim.txt b/doc/fzf-vim.txt index 9248fb1..894f9ff 100644 --- a/doc/fzf-vim.txt +++ b/doc/fzf-vim.txt @@ -75,7 +75,7 @@ COMMANDS *fzf-vim-commands* Command | List ~ -----------------+------------------------------------------------------------------- `Files [PATH]` | Files (similar to `:FZF` ) - `GitFiles` | Git files (git ls-files) + `GitFiles [OPTS]` | Git files (git ls-files) `GitFiles?` | Git files (git status) `Buffers` | Open buffers `Colors` | Color schemes