junegunn / fzf.vim

fzf :heart: vim
MIT License
9.62k stars 584 forks source link

[[B]Commits] Support arguments for git-log #1455

Closed druckdev closed 1 year ago

druckdev commented 1 year ago

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.

junegunn commented 1 year ago

Now all three parameters are optional, we have to make sure all possible combinations work as expected. See the commit message for the list of commands and function calls I have tested with the updated code.

Please let me know if something is not working as expected or if there's anything else you want to address.

druckdev commented 1 year ago

LGTM, thanks!

Also for changing to join(). I am not so versed in vim-script and did not think/know of that.

druckdev commented 1 year ago

What do you think of adding -complete=file to Commits? For BCommits it does not really make sense, but I see a use-case in specifying files or folders to Commits.

One would have to reformat the s:defs block then...

junegunn commented 1 year ago

Merged, thanks!