about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2010-11-14 19:43:01 +0000
committerClint Adams <clint@users.sourceforge.net>2010-11-14 19:43:01 +0000
commit7be8594c8cfea3fac39fa73cd5bcbae7e7f23477 (patch)
treea764c8c4e3729557b4e9314b6828a8205cc2498f
parenta5f7c8d5a499814eedad83a60dcf90460eeeb74a (diff)
downloadzsh-7be8594c8cfea3fac39fa73cd5bcbae7e7f23477.tar.gz
zsh-7be8594c8cfea3fac39fa73cd5bcbae7e7f23477.tar.xz
zsh-7be8594c8cfea3fac39fa73cd5bcbae7e7f23477.zip
28411: complete submodule and annex as subcommands; complete files when the subcommand is unknown.
-rw-r--r--ChangeLog8
-rw-r--r--Completion/Unix/Command/_git10
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 88418c297..4e0aa500f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-14  Clint Adams  <clint@zsh.org>
+
+	* 28411: Completion/Unix/Command/_git: complete submodule
+	and annex as subcommands; complete files when the subcommand
+	is unknown.
+
 2010-11-10  Clint Adams  <clint@zsh.org>
 
 	* 28401: Completion/Debian/Command/_git-buildpackage:
@@ -13809,5 +13815,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5119 $
+* $Revision: 1.5120 $
 *****************************************************
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
       ;;