Closed Araly closed 3 years ago
will you try typing fish
before you try ga
again, just to be sure you're running it in fish? It's strange to see a zsh error while running the fish version of this plugin! I suspect a configuration error.
Is this just with ga
, or with other commands too?
I am running fish for sure, but I see that the SHELL variable is set to /bin/zsh, and if I try to set it with fish as a universal variable (that persists over reboots), it tells me it's overshadowed by a global variable (that is set for all sessions but doesn't persist) of the same name. So somewhere in my config something is setting that variable. If I just set the variable for that session only I can override the global value and ga
works without any issues. I'll hunt that configuration down on my side and I'll close this issue
@wfxr Have you ever seen anything like that?
Good luck @Araly, be sure to post a comment if you figure it out, may help someone in the future :)
@wfxr Have you ever seen anything like that?
I haven't seen this error. The error message looks like the fish
plugin was sourced in the zsh
shell
for some reasons.
Very strange, for sure!!
I couldn't find why the SHELL variable was set as a global variable anywhere. I have a setup at work where I can't chsh (it gets reset on reboots) so I tell alacritty and guake to run fish instead of the default shell. Maybe zsh still gets called and sets itself as SHELL, or maybe that's just set at login because my default shell is zsh.
My solution was to have set -gx SHELL /usr/bin/fish
in ~/.config/fish/config.fish
to overwrite it, and it works well. Maybe forgit or something called by forgit reads SHELL at some point to know what it's running on, even if it has been installed via omf ? I imagine my case of having SHELL not match with the shell that's running is not very common
Very strange! Well, glad you got to the bottom of it. Don't hesitate to reach out if you find any more issues
@Araly, interestingly enough, this just started happening with me too when I switched to a new job!
I will dig in at some point and see if we can fix this on the forgit side. I can't figure out why I can't update my shell with chsh
. I figured that would fix it. I'm going to use your hack for now.
Super strange
@Araly I think I have found the fix! It seems like you have to do a little legwork for fish to be identified as a shell
First, make sure fish is listed as a shell in /etc/shells. Here is a quick one liner that can help you do that.
which fish | sudo tee -a /etc/shells
Then you need to change the shell for your user
chsh -s (which fish)
You then need to close out of your terminal session, but then when you open a new one everything was good for me!
Will you confirm this works and get back to me?
I tried but it didn't work for me. I don't think I can change my shell at my work, or rather the shell is always overwritten when I reboot. I don't have that issue on my personal computer though, and fish is recognized as a shell all on its own. I'll just keep this little hack for now
Check list
Environment info
Problem / Steps to reproduce
In any git repo that I've tried, when I run
ga
, I don't see a diff in the right box, justI installed with the
omf
method