From a3c81ff80f9b17d3952354d445d65dd943635957 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Thu, 28 Jun 2007 15:02:13 +0000 Subject: 23609: merge in git clean completion from Nikolai Weibull's repository. --- Completion/Unix/Command/_git | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d4d2aa8f6..59e534769 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-commit-tree git-hash-object git-index-pack git-init-db git-merge-index git-mktag git-pack-objects git-prune-packed git-read-tree 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-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-hash-object git-index-pack git-init-db git-merge-index git-mktag git-pack-objects git-prune-packed git-read-tree 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-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 # Commands not completed: # git-sh-setup @@ -96,6 +96,7 @@ _git_commands () { 'checkout-index:copy files from the index to the working directory' 'cherry:find commits not merged upstream' 'cherry-pick:cherry-pick the effect of an existing commit' + 'clean:remove untracked files from the working tree' 'clone:clones a repository into a new directory' 'clone-pack:clones a repository into the current repository (transport)' 'commit:record changes to the repository' @@ -247,6 +248,15 @@ _git-checkout-index () { '*:file:_files' && ret=0 } +_git-clean () { + _arguments \ + '-d[remove untracked directories]' \ + '-n[just show what would be done]' \ + '-q[be quiet, only report errors]' \ + '(-X -x)-x[do use ignore rules]' \ + '(-X -x)-X[remove only files ignored by git]' && ret=0 +} + _git-commit-tree () { if (( CURRENT == 2 )); then __git_trees && ret=0 -- cgit 1.4.1