wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.4k stars 137 forks source link

Make fzf '--preview' argument overridable in environment #186

Closed carlfriedrich closed 2 years ago

carlfriedrich commented 2 years ago

Check list

Description

Arguments to fzf are passed via the FZF_DEFAULT_OPTS environment variable, which can be overridden by a dedicated FORGIT_<cmd>_FZF_OPTS variable for each command separately. The --preview argument, however, was excluded from this mechanism and hard-coded to the fzf call, so that there was no chance overriding it. This patch moves the passing of this argument to the FZF_DEFAULT_OPTS variable for all commands, so that it can be overridden as well.

Fixes #185

Type of change

Test environment

cjappl commented 2 years ago

This LGTM! Pinging @wfxr for a review

wfxr commented 2 years ago

:+1: LGTM!

@carlfriedrich Looks like it conflicts with the previous pr. Can you help resolve it?

carlfriedrich commented 2 years ago

@wfxr Thanks for checking this and approving my other PR! I have rebased this on the current master, so it's ready to be merged now as well.

wfxr commented 2 years ago

@carlfriedrich Thanks for your contribution!