bigH / git-fuzzy

interactive `git` with the help of `fzf`
MIT License
2.3k stars 42 forks source link

Fixup #49

Closed iloveitaly closed 11 months ago

iloveitaly commented 1 year ago

Would be awesome to add fixup as an option to the git commit view. Ability to select which commit (filtered by those that have edited the file(s) in staging) to fixup against.

bigH commented 1 year ago

I think that's a great idea. I have thought about this a lot myself. I feel implementing this would mean expanding to the next "ring of functionality". That is going to be a lot of work and something I'm not able to take on today.

You're free to create a PR if this is something you desperately need. You should be able to trace from here to figure out how to add new functionality to the status sub-command. It's actually quite straight forward once you understand things.

git fuzzy helper commands like this one get rewritten to calls to gf_helper_[helper name] functions like this one.

All you need to do is:

  1. add a variable for the binding if you like
  2. add a binding to the fzf call in lib/modules/status.sh that calls a helper like the others
  3. implement the helper you call above in lib/modules/helpers/status.sh