0

I am trying to get StarCluster's tab completion to work. Quoting the documentation:

to enable StarCluster bash-completion support for every shell you open, add the following line to your ~/.bashrc file:

source /path/to/starcluster/completion/starcluster-completion.sh

But I can not find the script file anywhere. I searched my machine, and I also search the starcluster github project. I can't find it anywhere.

Where is the file located?

4

1 回答 1

0

您可能只需要创建文件。

~/.bashrc每当您启动 shell 时都会运行,并提供特定于用户的 shell 环境定制。它位于您的主目录中,因此每个用户都可以拥有一个(不同的)。也就是说,在你开始定制你的 shell 环境之前,你~/.bashrc的可能是空的,如果它存在的话。

这样做的简单方法是:

echo "source /path/to/starcluster/completion/starcluster-completion.sh" >> ~./bashrc

这会将行附加到您的末尾,~/.bashrc如果该文件尚不存在,则创建该文件。否则,您可以使用您喜欢的文本编辑器创建一个文件并将该行放入其中。

编辑: OP 的问题没有附加到 $PATH。它是在寻找 starcluster-completion.sh 脚本以获取它。

您可以在此处找到 starcluster-completion.sh 脚本: https ://github.com/jtriley/StarCluster/blob/develop/completion/starcluster-completion.sh

于 2013-10-11T19:51:07.513 回答