From 903512c02b010bdc2b32955bc6bd1c684e3cc1e9 Mon Sep 17 00:00:00 2001 From: Guillaume Seren Date: Fri, 12 Dec 2014 18:17:49 +0100 Subject: [PATCH] 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. --- etc/bash_completion.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/bash_completion.sh b/etc/bash_completion.sh index f5a2d0b..de6f7b3 100644 --- a/etc/bash_completion.sh +++ b/etc/bash_completion.sh @@ -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" }