From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23742 invoked from network); 23 Sep 2007 19:29:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Sep 2007 19:29:37 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4325 invoked from network); 23 Sep 2007 19:29:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Sep 2007 19:29:32 -0000 Received: (qmail 5936 invoked by alias); 23 Sep 2007 19:29:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23823 Received: (qmail 5917 invoked from network); 23 Sep 2007 19:29:28 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Sep 2007 19:29:28 -0000 Received: (qmail 3808 invoked from network); 23 Sep 2007 19:29:28 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 23 Sep 2007 19:29:24 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 6A0625C285; Sun, 23 Sep 2007 15:29:22 -0400 (EDT) Date: Sun, 23 Sep 2007 15:29:22 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _git rev-parse Message-ID: <20070923192922.GA32156@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.5.16 (2007-06-11) The usual story. Index: Completion/Unix/Command/_git =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v retrieving revision 1.20 diff -u -r1.20 _git --- Completion/Unix/Command/_git 21 Sep 2007 18:47:28 -0000 1.20 +++ Completion/Unix/Command/_git 23 Sep 2007 19:28:41 -0000 @@ -1,10 +1,9 @@ -#compdef git git-annotate git-apply git-checkout-index git-clean git-commi= t-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-p= rune-packed git-read-tree git-remote git-unpack-objects git-update-index gi= t-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-me= rge-base git-name-rev git-rev-list git-show-index git-tar-tree git-unpack-f= ile git-var git-verify-pack git-clone-pack git-fetch-pack git-http-fetch gi= t-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-ap= plymbox git-bisect git-branch git-checkout git-cherry-pick git-clone git-co= mmit 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-o= bjects 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-stri= pspace +#compdef git git-annotate git-apply git-checkout-index git-clean git-commi= t-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-p= rune-packed git-read-tree git-remote git-rev-parse git-unpack-objects git-u= pdate-index git-write-tree git-cat-file git-diff-index git-diff-files git-d= iff-stages git-diff-tree git-fsck-objects git-ls-files git-ls-tree git-quil= timport git-merge-base git-name-rev git-rev-list git-show-index git-tar-tre= e 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 gi= t-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-re= pack git-reset git-resolve git-revert git-shortlog git-show-branch git-stat= us git-verify-tag git-whatchanged git-applypatch git-archimport git-archive= git-convert-objects git-cvsimport git-lost-found git-merge-one-file git-pr= une git-relink git-svnimport git-symbolic-ref git-tag git-update-ref git-ch= eck-ref-format git-cherry git-count-objects git-daemon git-get-tar-commit-i= d git-mailinfo git-mailsplit git-patch-id git-request-pull git-rm git-send-= email git-stripspace =20 # Commands not completed: # git-sh-setup # git-shell # git-parse-remote=20 -# git-rev-parse=20 =20 # TODO: most commands need a valid git repository to run, so add a check f= or it # so that we can make our handling a little bit cleaner (need to deal with @@ -1391,9 +1390,29 @@ ':end commit:__git_revisions' } =20 -# TODO: do we want this? -#_git-rev-parse () { -#} +_git-rev-parse () { + _arguments \ + '(--revs-only --no-revs)--revs-only[do not output flags and parameters= not meant for "git-rev-list"]' \ + '(--revs-only --no-revs)--no-revs[do not output flags and parameters m= eant for "git-rev-list"]' \ + '(--flags --no-flags)--flags[do not output non-flag parameters]' \ + '(--flags --no-flags)--no-flags[do not output flag parameters]' \ + '--default[use "arg" if there is no parameter given]:arg' \ + '--verify[verify parameter to be usable]' \ + '--sq[output single shell-quoted line]' \ + '--not[toggle ^ prefix of object names]' \ + '--symbolic[output in a format as true to input as possible]' \ + '--all[show all refs found in $GIT_DIR/refs]' \ + '--branches[show branch refs found in $GIT_DIR/refs/heads]' \ + '--tags[show tag refs found in $GIT_DIR/refs/tags]' \ + '--remotes[show tag refs found in $GIT_DIR/refs/remotes]' \ + '--show-prefix[show path of current directory relative to top-leve dir= ectory]' \ + '--show-cdup[show path of top-level directory relative to current dire= ctory]' \ + '--git-dir[show "$GIT_DIR" if defined else show path to ".git" directo= ry]' \ + '--short=3D-[show only handful hexdigits prefix]:: :_guard "[[\:digit\= :]]#" number' \ + {--after=3D-,--since=3D-}'[show "--max-age=3D" parameter corresponding= given date string]:datestring' \ + {--berore=3D-,--until=3D-}'[show "--min-age=3D" parameter correspondin= g given date string]:datestring' \ + '*:args' && ret=3D0 +} =20 _git-rm () { _arguments -S -A '-*' \