Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ's embedded terminal does not load fish functions

Tags:

I'm using IntelliJ's embedded terminal with the fish shell, which works well with one exception: it does not seem to load the fish functions defined in ~/.config/fish/functions/*.

When I use the macOS Terminal.app or iTerm2, the functions get loaded as they are supposed to, only IntelliJ's embedded terminal fails to do so.

Oddly enough, the IntelliJ terminal does load ~/.config/fish/config.fish just fine.

Here's the output of echo $fish_function_path in iterm2 and Terminal.app:

/Users/moritz/.config/fish/functions
/usr/local/Cellar/fish/2.6.0/etc/fish/functions
/usr/local/share/fish/vendor_functions.d
/usr/local/Cellar/fish/2.6.0/share/fish/functions

And here's the output when running the same in IntelliJ's embedded terminal:

/Applications/IntelliJ IDEA.app/Contents/plugins/terminal/fish/functions
/usr/local/Cellar/fish/2.6.0/etc/fish/functions
/usr/local/share/fish/vendor_functions.d
/usr/local/Cellar/fish/2.6.0/share/fish/functions

I guess this looks like IntelliJ's embedded terminal initializes the fish session with a different value for $fish_function_path?

$HOME (=/Users/moritz) and $XDG_CONFIG_HOME (not set) are the same in all three, iTerm2, Terminal.app and IntelliJ's embedded terminal.

like image 544
anothernode Avatar asked Oct 06 '17 15:10

anothernode


People also ask

How do I run a terminal in IntelliJ?

We can open the terminal window with ⌥F12 on macOS, or Alt+F12 on Windows and Linux. The terminal supports all the same commands that the operating system supports. and press enter.


1 Answers

I was able to get the same result from echo $fish_function_path in IntelliJ's embeded terminal and iTerm2 by going to Settings | Terminal then turning off Shell integration.

I was using phpStorm 2017.3.4 but I assume this will also work in any IntelliJ embedded terminal.

like image 196
ook Avatar answered Oct 22 '22 17:10

ook