From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: _git and revision_arguments
Date: Sun, 30 Sep 2007 15:18:03 -0400 [thread overview]
Message-ID: <20070930191803.GA16961@scowler.net> (raw)
This seems a slightly cleaner.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.34
diff -u -r1.34 _git
--- Completion/Unix/Command/_git 30 Sep 2007 18:43:08 -0000 1.34
+++ Completion/Unix/Command/_git 30 Sep 2007 19:17:07 -0000
@@ -15,6 +15,7 @@
local help_arg template_arg shared_arg thin_arg author_conversion_file_arg_spec
local -a diff_args fetch_args merge_args force_ref_arg tags_fetch_arg
local -a upload_pack_arg common_fetch_args common_apply_args
+local -a revision_arguments
nul_arg='-z[use NUL termination on output]'
abbrev_arg='--abbrev=-[set minimum SHA1 display-length]: :_guard "[[\:digit\:]]#" length'
@@ -976,8 +977,6 @@
_arguments \
'*:index file:__git_cached_files' && ret=0
else
- declare -a revision_arguments
-
__git_setup_revision_arguments
_arguments -S \
@@ -1011,8 +1010,6 @@
(( $+functions[_git-show] )) ||
_git-show () {
- declare -a revision_arguments
-
__git_setup_revision_arguments
_arguments -S \
@@ -1153,8 +1150,6 @@
# TODO: -- undocumented.
(( $+functions[_git-reflog] )) ||
_git-reflog () {
- declare -a revision_arguments
-
__git_setup_revision_arguments
if (( CURRENT == 2 )); then
@@ -1707,8 +1702,6 @@
(( $+functions[_git-log] )) ||
_git-log () {
- declare -a revision_arguments
-
__git_setup_revision_arguments
_arguments -S \
@@ -1854,8 +1847,6 @@
# less what git-rev-list takes).
(( $+functions[_git-shortlog] )) ||
_git-shortlog () {
- declare -a revision_arguments
-
__git_setup_revision_arguments
_arguments -S \
@@ -1906,8 +1897,6 @@
# TODO: This should take those arguments that git-diff-tree can take, as well.
(( $+functions[_git-whatchanged] )) ||
_git-whatchanged () {
- declare -a revision_arguments
-
__git_setup_revision_arguments
_arguments -S \
@@ -2442,8 +2431,6 @@
'--minimize[undocumented]')
;;
(log)
- declare -a revision_arguments
-
__git_setup_revision_arguments
arguments+=(
next reply other threads:[~2007-09-30 19:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 19:18 Clint Adams [this message]
2007-10-01 7:21 ` Nikolai Weibull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070930191803.GA16961@scowler.net \
--to=clint@zsh.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).