wfxr / forgit

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

Brew installation of fish shell plugin failing #377

Closed Trid-collab closed 3 months ago

Trid-collab commented 3 months ago

Check list

Environment info

Problem / Steps to reproduce

I am new to this. Need help. I have installed forgit on my MacBook as per the installation instructions mentioned for both zsh and fish shells using brew

then pasted the following as mentioned

Fish:

~/.config/fish/config.fish:

[ -f $HOMEBREW_PREFIX/share/forgit/forgit.plugin.fish ]; and source $HOMEBREW_PREFIX/share/forgit/forgit.plugin.fish

Zsh:

~/.zshrc:

[ -f $HOMEBREW_PREFIX/share/forgit/forgit.plugin.zsh ] && source $HOMEBREW_PREFIX/share/forgit/forgit.plugin.zsh`

However I find that forgit works on my zsh shell but isn't in the fish shell I get the following error if I run say 'glo' in the fish shell, where as it works on the zsh shell



``` ↪ git-forgit log
fish: Unknown command: /opt/homebrew/share/conf.d/bin/git-forgit
- (line 1):
function git-forgit --wraps /opt/homebrew/share/conf.d/bin/git-forgit --description 'alias git-forgit /opt/homebrew/share/conf.d/bin/git-forgit';  /opt/homebrew/share/conf.d/bin/git-forgit $argv
                                                                                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function 'git-forgit' with arguments 'log'
sandr01d commented 3 months ago

As you are our fish and macOS guru, could you take a look at @cjappl?

cjappl commented 3 months ago

Can you give the output of:

> ls $HOMEBREW_PREFIX/share/forgit/forgit.plugin.fish

As well as:

> ls $HOMEBREW_PREFIX/bin/git-forgit
Trid-collab commented 3 months ago

↪ > ls $HOMEBREW_PREFIX/share/forgit/forgit.plugin.fish fish: Expected a string, but found a redirection

↪ > ls $HOMEBREW_PREFIX/bin/git-forgit fish: Expected a string, but found a redirection

cjappl commented 3 months ago

Hmm, how about

''' echo $HOMEBREW_PREFIX '''

Not really sure what your output means. Can you tell via some other means (opening finder and going to the location) that those two files exist?

Trid-collab commented 3 months ago

Output of echo $HOMEBREW_PREFIX /opt/homebrew

in finder both the files exist in their places

Screenshot 2024-03-29 at 8 32 17 PM Screenshot 2024-03-29 at 8 27 06 PM
cjappl commented 3 months ago

Will be fixed once #379 is merged and we do a release to homebrew.

In the meantime I recommend just using the github repo directly. Thanks for reporting!!

cjappl commented 3 months ago

@Trid-collab please update forgit with brew and this should be fixed (I just checked it).

Please let me know if you still see the issue.

Trid-collab commented 3 months ago

Hi Chris,

Thank you. It works perfectly now. This was one tool which was hindering my migration from zsh to fish.

I also checked it with fish and zsh in WSL in windows as well -where it also works fine.

Regards Tridib

On Mon, Apr 1, 2024 at 7:55 AM Chris Apple @.***> wrote:

@Trid-collab https://github.com/Trid-collab please update forgit with brew and this should be fixed (I just checked it).

Please let me know if you still see the issue.

— Reply to this email directly, view it on GitHub https://github.com/wfxr/forgit/issues/377#issuecomment-2029047974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOT3LVD7ZTZS5EBRZ6TYWA3Y3DAS3AVCNFSM6AAAAABFNLQULWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZGA2DOOJXGQ . You are receiving this because you were mentioned.Message ID: @.***>

cjappl commented 3 months ago

Enjoy fish!! I've been a convert for years and I love it.

Cheers

On Mon, Apr 1, 2024 at 6:25 AM, Trid-collab @.***(mailto:On Mon, Apr 1, 2024 at 6:25 AM, Trid-collab < wrote:

Hi Chris,

Thank you. It works perfectly now. This was one tool which was hindering my migration from zsh to fish.

I also checked it with fish and zsh in WSL in windows as well -where it also works fine.

Regards Tridib

On Mon, Apr 1, 2024 at 7:55 AM Chris Apple @.***> wrote:

@Trid-collab https://github.com/Trid-collab please update forgit with brew and this should be fixed (I just checked it).

Please let me know if you still see the issue.

— Reply to this email directly, view it on GitHub https://github.com/wfxr/forgit/issues/377#issuecomment-2029047974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOT3LVD7ZTZS5EBRZ6TYWA3Y3DAS3AVCNFSM6AAAAABFNLQULWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZGA2DOOJXGQ . You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>