wfxr / forgit

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

Bugfix: gd(git diff) for fish does not work with arguments #154

Closed ray-x closed 3 years ago

ray-x commented 3 years ago

Check list

Description

fish does not use $1 and $2 for arguments, instead it using $argv which is a array/list and to index $1, $argv[1] should be used. I am not sure why this issue was not reported before. But I believe it has been there for a long time.

To test:

gd branch_name

It should works for both zsh and fish. But it only works for zsh ATM. Run command in fish, an error will be shown

Type of change

Test environment

cjappl commented 3 years ago

Looks great @ray-x. Thanks for the fix!

I'm sure this has been in this for a while, the initial version of this I had to copy and convert a lot of code, so not surprised there are bugs lurking.

Thanks for being proactive and submitting this, much appreciated :)