gpt4 book ai didi

linux - Fish shell 中的 source 命令

转载 作者:行者123 更新时间:2023-12-02 02:46:24 25 4
gpt4 key购买 nike

该命令在 Fish 终端中运行良好:

source ~/.config/fish/config.fish

这是config.fish中相关的fish函数

function sf
command source ~/.config/fish/config.fish
end

当我运行它时,我收到此错误:

Command 'source' not found, did you mean:

command 'gource' from deb gource (0.51-1build1)

Try: sudo apt install <deb name>

~/.config/fish/config.fish (line 59):
command source ~/.config/fish/config.fish
^
in function 'sf'

感谢任何帮助!

最佳答案

source 不是一个外部命令 - 没有/usr/bin/source 可以执行。不可能,因为 source 需要能够更改当前 shell 的环境,因此它必须是内置的。

只需省略命令即可。

关于linux - Fish shell 中的 source 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62751979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com