wfxr / forgit

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

Adding wraps to fish #231

Closed cjappl closed 1 year ago

cjappl commented 1 year ago

I added a bunch of "wraps" commands to our functions. This is basically a quick and easy way to get function completion for free. Users can now tab complete most commands that take an argument

carlfriedrich commented 1 year ago

Can we maybe split this into two MRs? One for the completion (this one) and one for the branch switching (a new one)? That would make the changesets more clear.

carlfriedrich commented 1 year ago

For bash, adding bash completion for gcb would work like this:

__git_complete gcb _git_checkout

@wfxr Do you know the equivalent for zsh?

cjappl commented 1 year ago

Can we maybe split this into two MRs? One for the completion (this one) and one for the branch switching (a new one)? That would make the changesets more clear.

Yeah, good idea! Should have done it to begin with. I'm going to make this one the autocomplete one, and the other one will be the branch functionality.

cjappl commented 1 year ago

I'm going to merge this as is, seeing as I think it's a boost for our fish users. If we want to open a task or PR to do autocomplete in zsh/bash that would be cool too :) I have no idea if that functionality exists or not for those shells.

I've separated this into the "wraps" change only, another one incoming with the gcb change