我正在使用IntelliJ的嵌入式终端和fish shell,除了一个问题外,它运行良好:似乎不会加载~/.config/fish/functions/*
中定义的fish函数。
当我使用macOS的Terminal.app或iTerm2时,函数会按预期加载,只有IntelliJ的嵌入式终端无法加载。
奇怪的是,IntelliJ终端确实可以正常加载~/.config/fish/config.fish
。
这里是在iterm2和Terminal.app中运行echo $fish_function_path
的输出:
/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的嵌入式终端中运行时,以下是输出结果:
/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会话中的$fish_function_path
?
$HOME
(=/Users/moritz
)和$XDG_CONFIG_HOME
(未设置)在三个终端中,即iTerm2、Terminal.app和IntelliJ的嵌入式终端中都相同。
echo $fish_function_path
显示什么?在IntellJ的终端和Terminal.app下,它们的输出有区别吗? - ridiculous_fishconfig.fish
中定义的别名甚至在IntelliJ的嵌入式终端中也能工作。如果这有矛盾之处,那就是这样的;-) - anothernode