Maven 的 Bash 完成转义冒号 [英] Bash completion for Maven escapes colon
问题描述
我按照文档为 Maven 添加了 bash 补全:
I added bash completion for Maven following the docs:
http://maven.apache.org/guides/mini/guide-bash-m2-completion.html
除了使用冒号的目标外,一切正常.例如,代替
Everything works well except for goals that use a colon. For instance, instead of
mvn eclipse:eclipse
完成转义冒号
mvn eclipse:eclipse
有什么建议可以解决这个问题吗?我使用的是 Ubuntu 8.10 (2.6.27-17-generic) 和
Any suggestions how this can be fixed? I'm using Ubuntu 8.10 (2.6.27-17-generic) and
$ bash -版本
GNU bash,版本 3.2.39(1)-release (i486-pc-linux-gnu)
$ bash -version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
推荐答案
来自 Bash FAQ E13.
就在您链接到的脚本中的 complete
命令之后,发出此命令以从完成分词符列表中删除冒号:
Just after the complete
command in the script you linked to, issue this command to remove the colon from the list of completion word break characters:
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
这篇关于Maven 的 Bash 完成转义冒号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!