mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-10 06:21:54 +08:00
* [[B]Commits] Support arguments for git-log
Add support for command arguments that are passed to git-log (e.g.
:Commits -S foo -3).
The place of insertion is relevant. Generally the arguments should come
at the end to overwrite existing flags if necessary, but need to come
before the pathspec (i.e. `fzf#shellescape(current)`) in BCommits.
* [[B]Commits] Make sure all positional arguments are optional
Test cases:
" With default options
%call fzf#vim#commits()
" Full screen
%call fzf#vim#commits(1)
" Not full screen
%call fzf#vim#commits(0)
" With extra fzf options
%call fzf#vim#commits({ 'up': '50%', 'options': '--no-color' })
" With extra fzf options (with preview) and in full screen
%call fzf#vim#commits(fzf#vim#with_preview({ 'options': '--no-color', 'placeholder': '' }), 1)
" With extra git log options
%call fzf#vim#commits('-S foo')
" With extra git log options in full screen
%call fzf#vim#commits('-S foo', 1)
" With extra git log options and fzf options
%call fzf#vim#commits('-S foo', { 'options': '--no-color' })
" In full-screen
%call fzf#vim#commits('-S foo', { 'options': '--no-color' }, 1)
" Command form
Commits
Commits!
Commits -S foo
Commits! -S foo
* [Commits] Enable file completion for arguments
This gets handy when BCommits is too narrow (e.g. multiple files or a
folder is specified).
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>