Ignore ORIG_HEAD in zsh git autocomplete
-
03-07-2021 - |
Pregunta
I use oh-my-zsh and git autocompletion.
If I type git checkout org
and hit TAB I get these results:
ORIG_HEAD origin/HEAD origin/mybranch
How can I make the autocompletion to ignore ORIG_HEAD
?
Solución
Add this to your .zshrc
:
zstyle ':completion:*:*' ignored-patterns '*ORIG_HEAD'
This will ignore all files ending with ORIG_HEAD
when multiple files exist.
Otros consejos
You could edit /usr/share/zsh/functions/Completion/Unix/_git and remove ORIG_HEAD in the following line (line 5091 for me):
for f in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
You could remove
.git/ORIG_HEAD
:)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow