From: Felipe Contreras Date: Mon, 07 May 2012 01:23:17 GMT Subject: [RFC/PATCH v4 3/6] completion: simplify _git_bundle Message-ID: <1336353800-17323-4-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1336353800-17323-1-git-send-email-felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 4098902..8de0358 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1142,16 +1142,18 @@ _git_branch () _git_bundle () { - local cmd="${words[2]}" + local subcommands='create list-heads verify unbundle' + local subcommand="$(__git_find_on_cmdline "$subcommands")" + case "$cword" in 2) - __gitcomp "create list-heads verify unbundle" + __gitcomp "$subcommands" ;; 3) # looking for a file ;; *) - case "$cmd" in + case "$subcommand" in create) __git_complete_revlist ;; -- 1.7.10