wfxr / forgit

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

Feature request: add preview settings everywhere #391

Open ccoVeille opened 2 months ago

ccoVeille commented 2 months ago

Check list

Idea

I worked on implementing #389, would like me to add something equivalent to forgit log and other commands ?

ccoVeille commented 2 months ago

Assign me the issue if you are OK with my ideas.

https://github.com/wfxr/forgit/blob/2903fef2af644527ff2e19b9e6fd9b54bb0af17a/bin/git-forgit#L300-L307

https://github.com/wfxr/forgit/blob/2903fef2af644527ff2e19b9e6fd9b54bb0af17a/bin/git-forgit#L426-L432

https://github.com/wfxr/forgit/blob/2903fef2af644527ff2e19b9e6fd9b54bb0af17a/bin/git-forgit#L475-L483

...

ccoVeille commented 2 months ago

I will have to find something to avoid duplicating code, maybe something like what you did for the pager. I will figure it later, if you are OK with me implementing this

carlfriedrich commented 2 months ago

@ccoVeille Thanks for your input and your contribution. I like the idea and would gladly accept a PR introducing this setting for all preview functions instead of just for one (like now done in #389). So before merging that one, let's see if you find a general solution with useful code sharing.

@cjappl @wfxr @sandr01d What do you think?

ccoVeille commented 2 months ago

I'll wait for other contributors feedbacks. But OK, I can put everything together.

I'll need time of course

ccoVeille commented 2 months ago

But no matter, how I'll do it, it won't affect the variable and the result of the variable I added in #389. So from my perspective it can be merged now. But I'm OK if you want me to implement everything