IntelliJ的嵌入式终端不加载鱼功能 [英] IntelliJ's embedded terminal does not load fish functions
问题描述
我正在使用IntelliJ的嵌入式终端和鱼壳,它有一个例外:它似乎不太好加载〜/ .config / fish / functions / *
中定义的鱼函数。
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/*
.
当我使用macOS Terminal.app或iTerm2,函数按预期加载,只有IntelliJ的嵌入式终端无法这样做。
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.
奇怪的是,IntelliJ终端 加载〜/ .config / fish / config.fish
就好了。
Oddly enough, the IntelliJ terminal does load ~/.config/fish/config.fish
just fine.
这是输出iterm2和Terminal.app中的 echo $ fish_function_path
:
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
这里是在IntelliJ的嵌入式终端中运行相同的输出:
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
我想这看起来像IntelliJ的嵌入式终端用 $ fish_function_path
的不同值初始化fish会话?
I guess this looks like IntelliJ's embedded terminal initializes the fish session with a different value for $fish_function_path
?
$ HOME
(= / Users / moritz
)和 $ XDG_CONFIG_HOME
(未设置)在所有三个中都相同,iTerm2,Terminal.app和IntelliJ的嵌入式终端。
$HOME
(=/Users/moritz
) and $XDG_CONFIG_HOME
(not set) are the same in all three, iTerm2, Terminal.app and IntelliJ's embedded terminal.
推荐答案
我可以通过转到设置|来自IntelliJ的嵌入式终端和iTerm2中的 echo $ fish_function_path
获得相同的结果。终端然后关闭Shell集成。
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.
我使用的是phpStorm 2017.3.4,但我认为这也适用于任何IntelliJ嵌入式终端。
I was using phpStorm 2017.3.4 but I assume this will also work in any IntelliJ embedded terminal.
NB我已经按照接受的答案链接中的步骤进行操作,因此您可能需要先执行此操作。
N.B. I had already followed the steps in the accepted answers link so you may need to do this first.
这篇关于IntelliJ的嵌入式终端不加载鱼功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!