繁体   English   中英

鱼 shell 中的源命令

[英]source command in fish shell

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

source ~/.config/fish/config.fish

这是config.fish中的一条相关鱼function

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的环境,所以它必须是内置的。

简单地离开command

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM