Fish Shell Config

I recently installed a new fish function, but then latter uninstalled it.  When I open a MacOS terminal (which starts in a fish shell) everything works as expected.  However, the embedded Rubymine terminal prints the following each time I start a new embedded terminal.

> source: Error encountered while sourcing file '~/.config/fish/functions/my-old-function.fish':
> source: No such file or directory

A assume I need to cleanup an updated file somewhere for Rubymine, unless Rubymine cached something?  Either way, I can't find the config file attempting to source a missing file.

Suggestions on where to look?

0

Hello,

Could you please attach a screenshot from Preferences | Tools | Terminal. In addition, which RubyMine version do you use?

0

RubyMine 2021.3.1

0

I resolved the issue and why the embedded terminal in Rubymine behaves differently than the shell.

Rubymine uses the following fish shell script to load the fish environment:

/Applications/RubyMine 2021.3.app/Contents/plugins/terminal/fish/config.fish

This script includes the following lines of code

...
if test -d ~/.config/fish/functions
  for f in ~/.config/fish/functions/*.fish
    source $f
  end
end
...

The above script loads all function scripts in the functions folder.  However, the behavior of the default fish terminal does not load all functions. Instead, it loads `~/.config/fish/config.fish` and then inside the `config.fish` folder you define which scripts in the functions folder you want to load.

Coincidentally, the same Rubymine fish script also includes:

...
if test -f ~/.config/fish/config.fish
  . ~/.config/fish/config.fish
end
...

So for me, if I comment (or remove) the code which auto-loads all functions, then both internal and external shells behave the same.

0

Hello,

Thank you for sharing your workaround. That appears to be a known problem so could you please add your vote to it:

https://youtrack.jetbrains.com/issue/IDEA-186613/Fish-shell-integration-broken

0

请先登录再写评论。