如何在bash脚本unix中使用点文件

时间:2014-06-27 09:04:20

标签: linux git bash shell unix

我正在尝试安装git的自动完成功能(我不想使用Homebrew来执行此操作),因此我将以下内容放在bash_profile

if [ -f ~/.git-completion.bash ]; then
  source ~/.git-completion.bash
fi

.git-completion.bash是我从github上载的安装脚本,具体来说是:

https://github.com/git/git/raw/master/contrib/completion/git-completion.bash

.git-completion.bash文件存在,我可以在运行ls -la时看到它但是,每次打开终端窗口时,我都会看到

-bash: /Users/Username/git-completion.bash: No such file or directory

(我不知道为什么它在该错误中没有“。”

如果没有自制软件,我将不胜感激。感谢

0 个答案:

没有答案