簡體   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