summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-09-21 18:47:28 +0000
committerClint Adams <clint@users.sourceforge.net>2007-09-21 18:47:28 +0000
commitcf6c33dcf9b77b3184b2ea7f7cc579cb59b2182f (patch)
treeb5cd85bb7591fcca2e4417e882088da46d04d657 /Completion
parenta5ccfcf70b424b369237e3a746eef0409d8b4724 (diff)
downloadzsh-cf6c33dcf9b77b3184b2ea7f7cc579cb59b2182f.tar.gz
zsh-cf6c33dcf9b77b3184b2ea7f7cc579cb59b2182f.tar.xz
zsh-cf6c33dcf9b77b3184b2ea7f7cc579cb59b2182f.zip
23822: merge in git rm completion fixes from Nikolai Weibull's repository.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git12
1 files changed, 11 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 17af921b5..4cd3a5173 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1,4 +1,4 @@
-#compdef git git-annotate git-apply git-checkout-index git-clean git-commit-tree git-describe git-hash-object git-index-pack git-init-db git-instaweb git-merge-index git-merge-tree git-mktag git-mktree git-pack-objects git-prune-packed git-read-tree git-remote git-unpack-objects git-update-index git-write-tree git-cat-file git-diff-index git-diff-files git-diff-stages git-diff-tree git-fsck-objects git-ls-files git-ls-tree git-quiltimport git-merge-base git-name-rev git-rev-list git-show-index git-tar-tree git-unpack-file git-var git-verify-pack git-clone-pack git-fetch-pack git-http-fetch git-local-fetch git-peek-remote git-receive-pack git-send-pack git-ssh-fetch git-ssh-upload git-update-server-info git-upload-pack git-add git-am git-applymbox git-bisect git-branch git-checkout git-cherry-pick git-clone git-commit git-diff git-fetch git-format-patch git-grep git-log git-ls-remote git-merge git-mv git-octopus git-pull git-push git-rebase git-repack git-reset git-resolve git-revert git-shortlog git-show-branch git-status git-verify-tag git-whatchanged git-applypatch git-archimport git-archive git-convert-objects git-cvsimport git-lost-found git-merge-one-file git-prune git-relink git-svnimport git-symbolic-ref git-tag git-update-ref git-check-ref-format git-cherry git-count-objects git-daemon git-get-tar-commit-id git-mailinfo git-mailsplit git-patch-id git-request-pull git-send-email git-stripspace
+#compdef git git-annotate git-apply git-checkout-index git-clean git-commit-tree git-describe git-hash-object git-index-pack git-init-db git-instaweb git-merge-index git-merge-tree git-mktag git-mktree git-pack-objects git-prune-packed git-read-tree git-remote git-unpack-objects git-update-index git-write-tree git-cat-file git-diff-index git-diff-files git-diff-stages git-diff-tree git-fsck-objects git-ls-files git-ls-tree git-quiltimport git-merge-base git-name-rev git-rev-list git-show-index git-tar-tree git-unpack-file git-var git-verify-pack git-clone-pack git-fetch-pack git-http-fetch git-local-fetch git-peek-remote git-receive-pack git-send-pack git-ssh-fetch git-ssh-upload git-update-server-info git-upload-pack git-add git-am git-applymbox git-bisect git-branch git-checkout git-cherry-pick git-clone git-commit git-diff git-fetch git-format-patch git-grep git-log git-ls-remote git-merge git-mv git-octopus git-pull git-push git-rebase git-repack git-reset git-resolve git-revert git-shortlog git-show-branch git-status git-verify-tag git-whatchanged git-applypatch git-archimport git-archive git-convert-objects git-cvsimport git-lost-found git-merge-one-file git-prune git-relink git-svnimport git-symbolic-ref git-tag git-update-ref git-check-ref-format git-cherry git-count-objects git-daemon git-get-tar-commit-id git-mailinfo git-mailsplit git-patch-id git-request-pull git-rm git-send-email git-stripspace
 
 # Commands not completed:
 # git-sh-setup
@@ -182,6 +182,7 @@ _git_commands () {
     'rev-list:lists commit object in reverse chronological order'
     'rev-parse:picks out and massages parameters for other git commands'
     'revert:reverts an existing commit'
+    'rm:remove files from the working tree and from the index'
     'send-email:sends patch-e-mails out of "format-patch --mbox" output'
     'send-pack:pushes to a remote repository, intelligently'
     'shortlog:summarizes git log output'
@@ -1394,6 +1395,15 @@ _git-request-pull () {
 #_git-rev-parse () {
 #}
 
+_git-rm () {
+  _arguments -S -A '-*' \
+    '-f[override the up-to-date check]' \
+    "-n[don't actually remove the files, just show if they exist in the index]" \
+    '-r[allow recursive removal when a leading directory-name is given]' \
+    '--cached[only remove files from the index]' \
+    '*:files:__git_cached_files' && ret=0
+}
+
 _git-send-email () {
   _arguments \
     '(--no-chain-reply-to)--chain-reply-to[each email will be sent as a reply to the previous one sent]' \