为什么 fish 不使用我的 abbreviations.fish 文件?

Why is fish not using my abbreviations.fish file?

我有以下 abbreviations.fish 文件位于 ~/.config/fish/abbreviations.fish

abbr -a gco 'git checkout'

但是当我在终端时,我可以使用gco。我可以在 fish config 文件夹中创建任何 .fish 文件并且它们应该自动加载吗?

Can I just create any .fish files in the fish config folder and they should be automatically loaded?

没有

您可以在 ~/.config/fish/functions 中创建 function 文件(这些应该包含它们被命名的函数之后,并且仅在该函数即将执行时加载)。

在 fish >= 2.3.0 中,您可以将启动时获取的任意文件放入 ~/.config/fish/conf.d/ .唯一的限制是名称必须以“.fish”结尾。