Add ref completion to git-missing.

I find useful to get the ref completion in the git-missing command,
the behavior is the *like* the one on 'git log --pretty' it use the
'git for-each-ref' command to provide shortname of :
* All local branches.
* All remote/branches.
* All tags.
* The stash.

The output can be a bit huge, but provide a standard git / bash completion.
This commit is contained in:
Guillaume Seren 2014-12-12 18:17:49 +01:00
parent a4c04f2c2b
commit 903512c02b
No known key found for this signature in database
GPG key ID: 1F285AD22110AAF7

View file

@ -57,6 +57,11 @@ _git_ignore(){
esac
}
_git_missing(){
# Suggest all known refs
__gitcomp "$(git for-each-ref --format='%(refname:short)')"
}
_git_refactor(){
__git_extras_workflow "refactor"
}