如何像在 bash 中那样动态地重新加载 fish 配置文件?

我正在寻找相当于 source .bashrc

45050 次浏览

Use

source ~/.config/fish/config.fish

Or, if your fish is older than 2.1 (See fish#310)

. ~/.config/fish/config.fish

Then it will be sourced again, so depending on what you have in there it will be reloaded. For example appending to a universal variable would add more entries.