From 7be8594c8cfea3fac39fa73cd5bcbae7e7f23477 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 14 Nov 2010 19:43:01 +0000 Subject: 28411: complete submodule and annex as subcommands; complete files when the subcommand is unknown. --- Completion/Unix/Command/_git | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index c394e0845..af716be85 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -205,6 +205,7 @@ _git_commands () { 'stage:add file contents to the staging area' 'stash:stash away changes to the working tree' 'status:show working-tree'\''s status' + 'submodule:initialize or update or inspect submodules' 'tag:create tag object signed with GPG' 'verify-tag:check GPG signature of a tag') @@ -290,7 +291,8 @@ _git_commands () { 'cvsimport:import a CVS "repository" into a git repository' 'svnimport:import SVN repository into git' 'quiltimport:apply a quilt patchset' - 'svn:bidirectional operation between a single Subversion branch and git') + 'svn:bidirectional operation between a single Subversion branch and git' + 'annex:manage files without tracking content') local -a ancillary_commands ancillary_commands=( @@ -4493,7 +4495,11 @@ if [[ $service == git ]]; then __git_aliases_and_commands else curcontext="${curcontext%:*:*}:git-$words[1]:" - _call_function ret _git-$words[1] + if (( $+functions[_git-$words[1]] )); then + _call_function ret _git-$words[1] + else + _files + fi return ret fi ;; -- cgit 1.4.1