Jomik / fish-gruvbox

gruvbox theme for fish
MIT License
49 stars 9 forks source link

Theme breaks using ssh #3

Closed JSamir closed 2 years ago

JSamir commented 3 years ago

Hi,

I have the issue that as soon as I enable the theme (by that I mean putting the call in my config.fish file) I cannot ssh into machines for which I use the ProxyJump command.

Here is my .ssh/config file (only relevant parts):

Host gateway
  HostName    192.1.1.1
  Port              55555
  User             userName
  IdentityFile   ~/.ssh/key_gateway

Host server1
  HostName    server1.domain
  User             userName
  IdentityFile   ~/.ssh/key_server1
  ProxyJump   gateway

I get the same error as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1824974

kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to UNKNOWN port 65535: invalid format

After I found that bug and the last comment says that it had something to do with the fish config, I removed stuff from my config until it worked. And it works after I remove theme_gruvbox from my config file.

Just to be sure since I am new to fish shell: this line is meant to go in my config.fish file, right? theme_gruvbox dark hard

Anyways, I removed the line and it works now.

If I set the theme in the terminal (without having set it in my config.fish file) then the theme is applied and I can still connect. So I am kind of not sure if I need to put this line in my config.fish file at all.

hegga commented 3 years ago

@JSamir You can solve this by changing your configuration to the following:

if status --is-interactive
        theme_gruvbox dark hard
end
JSamir commented 3 years ago

That worked, thanks.

One related question: do I need to put this lines in the config.fish file at all? Because when I run the command in the terminal the colors get applied and stay like that even if I do not add those lines in the config.fish file.

Jomik commented 2 years ago

@JSamir You can solve this by changing your configuration to the following:

if status --is-interactive
        theme_gruvbox dark hard
end

Thank you, do you want to open a PR with this snippet in the README?

That worked, thanks.

One related question: do I need to put this lines in the config.fish file at all? Because when I run the command in the terminal the colors get applied and stay like that even if I do not add those lines in the config.fish file.

You may not have to, I would suggest you do though, or you may suddenly not have the theme.