重击完成
我尝试加载 bash_completion我的 bash (3.2.25),它不起作用。没有消息等。我在 .bashrc 中使用了以下内容,
if [ -f ~/.bash_completion ]; then
. ~/.bash_completion
fi
我也尝试使用 .bash_profile 代替,但结果相同。 那么问题是为什么它不起作用呢?有什么想法吗?提示?
I've tried to load bash_completion in my bash (3.2.25), it does not work. No message etc. I've used the following in my .bashrc
if [ -f ~/.bash_completion ]; then
. ~/.bash_completion
fi
I also tried to use .bash_profile instead, but with the same result.
So the problem is why does it not work? Any idea? Hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简单地获取该文件将不会向终端产生任何输出。它所做的只是定义一堆函数。一旦你获取了它,你应该能够对 svn 命令进行制表符补全。输入 svn Space 并按 Tab 两次。您应该会看到 svn 命令列表。
Simply sourcing that file will produce no output to the terminal. All it does is define a bunch of functions. Once you've sourced it, you should be able to do tab completions on svn commands. Type svn Spaceand press Tab twice. You should see a list of svn commands.
所以这似乎是一个愚蠢的问题,但是您是否将颠覆 bash_completion 放入名为
.bash_completion
的文件中或放入名为bash_completion
的文件中? (注意第一个点)ls -la bash* .bash*
说什么?为了使上面的代码片段正常工作,您需要将 subversion 文件放在
.bash_completion
中。如果不是,请执行以下操作:So this may seem like a stupid question, but did you put the subversion bash_completion into a file called
.bash_completion
or into a file calledbash_completion
? (Note the initial dot) What doesls -la bash* .bash*
say?For the snippet above to work, you need the subversion file to be in
.bash_completion
. If it isn't, do: