我使用 oh-my-zsh 和 git 自动补全。
如果我输入 git checkout org
并按下 TAB,我会得到这些结果:
ORIG_HEAD origin/HEAD origin/mybranch
如何让自动完成功能忽略 ORIG_HEAD
?
最佳答案
将此添加到您的 .zshrc
:
zstyle ':completion:*:*' ignored-patterns '*ORIG_HEAD'
当存在多个文件时,这将忽略所有以 ORIG_HEAD
结尾的文件。
关于git - 忽略 zsh git autocomplete 中的 ORIG_HEAD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12508595/