Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/3] _git: Complete bisect/new as well as bisect/bad.
Also, complete the bisect/old-$commithash ref names.
---
I'm not sure if completing the bisect/old-* ref names is actually
useful; the completion offers no information on their position in the
bisect trace, just the commit hash.
Completion/Unix/Command/_git | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7f2c206c1..8e0d57789 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6709,14 +6709,12 @@ __git_heads_local () {
local f gitdir
declare -a heads
- heads=(${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname:short)"' refs/heads 2>/dev/null)"})
+ heads=(${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname:short)"' refs/heads refs/bisect refs/stash 2>/dev/null)"})
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
if __git_command_successful $pipestatus; then
for f in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
[[ -f $gitdir/$f ]] && heads+=$f
done
- [[ -f $gitdir/refs/stash ]] && heads+=stash
- [[ -f $gitdir/refs/bisect/bad ]] && heads+=bisect/bad
fi
__git_describe_commit heads heads-local "local head" "$@"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author