junegunn / fzf.vim

fzf :heart: vim
MIT License
9.51k stars 581 forks source link

Provide ability to add own log command #1526

Open PlasmaHH opened 4 months ago

PlasmaHH commented 4 months ago

I have been using fzf on the command line for a long time now and been using an integration for git parameters extensively. However instead of pure git log output I am using an alternative output formatter called git-foresta. For this I am using an alias instead of log.

It would be most useful for me if fzf.vim could call a different command alltogether. So in vim.vim commits ~line 1457 instead of assembling the command with the commits_log_options check for the existence of a complete command option and if present use that instead.

junegunn commented 3 months ago

Should that be named g:fzf_vim.commits_command? Can you give an example of your git-foresta command?

PlasmaHH commented 3 months ago

The aliases I use are pretty easy:

    lol = !git-foresta --style=10 $1
    lola = !git lol --all $1

as the git-foresta script hides basically all details.

but in the end I would think the default of the new option is log and one could replace it by whatever alias one likes (lola in my case probably), thats the most flexible thing to do.

Since the current config for the logs options is commits_log_options I would suggest maybe commits_log_command ?