zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: minor git completion tweaks
@ 2016-08-19 16:49 Oliver Kiddle
  2016-08-19 22:46 ` Mikael Magnusson
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2016-08-19 16:49 UTC (permalink / raw)
  To: Zsh workers

This is just a few minor tweaks that were suggested off-list following
last week's patch.

Oliver

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index ac4c90e..f4011aa 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -249,11 +249,7 @@ _git-bisect () {
               ;;
           esac
           ;;
-        (${(j.|.)~good})
-          _arguments \
-            ': :__git_commits' && ret=0
-          ;;
-        (${(j.|.)~good}|skip)
+        (${(j.|.)~bad}|${(j.|.)~good}|skip)
           # TODO: skip can take revlists.
           _arguments \
             '*: :__git_commits' && ret=0
@@ -991,7 +987,7 @@ _git-grep () {
     '(-A --after-context)'{-A+,--after-context=}'[show <num> trailing lines, and separate groups of matches]: :__git_guard_number lines' \
     '(-B --before-context)'{-B+,--before-context=}'[show <num> leading lines, and separate groups of matches]: :__git_guard_number lines' \
     '(-A --after-context -B --before-context -C --context)'{-C+,--context=}'[show <num> leading and trailing lines, and separate groups of matches]: :__git_guard_number lines' \
-    '--threads=[use specified number of threads]:threads' \
+    '--threads=[use specified number of threads]:number of threads' \
     '(-p --show-function)'{-p,--show-function}'[show preceding line containing function name of match]' \
     '(-W --function-context)'{-W,--function-context}'[show whole function where a match was found]' \
     '(1)*-f+[read patterns from given file]:pattern file:_files' \
@@ -1926,7 +1922,7 @@ _git-tag () {
   _arguments -A '-*' \
     - creation \
       '(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \
-      '(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create an signed and annotated tag]' \
+      '(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create a signed and annotated tag]' \
       '(-a --annotate -s --sign)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \
       '(-f --force)'{-f,--force}'[replace existing tag]' \
       '--create-reflog[create a reflog]' \
@@ -4452,7 +4448,7 @@ _git-index-pack () {
     '--stdin[read pack from stdin and instead write to specified file]' \
     $stdin_opts \
     '--strict[die if the pack contains broken objects or links]' \
-    '--threads=[specify number of threads to use]:threads' \
+    '--threads=[specify number of threads to use]:number of threads' \
     ':pack file:_files -g "*.pack(-.)"'
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: minor git completion tweaks
  2016-08-19 16:49 PATCH: minor git completion tweaks Oliver Kiddle
@ 2016-08-19 22:46 ` Mikael Magnusson
  0 siblings, 0 replies; 2+ messages in thread
From: Mikael Magnusson @ 2016-08-19 22:46 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: Zsh workers

On Fri, Aug 19, 2016 at 6:49 PM, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> This is just a few minor tweaks that were suggested off-list following
> last week's patch.
>
> Oliver
>
> diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
> index ac4c90e..f4011aa 100644
> --- a/Completion/Unix/Command/_git
> +++ b/Completion/Unix/Command/_git
> @@ -249,11 +249,7 @@ _git-bisect () {
>                ;;
>            esac
>            ;;
> -        (${(j.|.)~good})
> -          _arguments \
> -            ': :__git_commits' && ret=0
> -          ;;
> -        (${(j.|.)~good}|skip)
> +        (${(j.|.)~bad}|${(j.|.)~good}|skip)
>            # TODO: skip can take revlists.
>            _arguments \
>              '*: :__git_commits' && ret=0

Could this be (~j.|.) instead? Just in case someone defines good/bad
terms with a pattern character in them :). Also, should it be "git
bisect terms" above this, rather than just "git terms"? I only have
the former, on git 2.8.xyz.

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-19 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-19 16:49 PATCH: minor git completion tweaks Oliver Kiddle
2016-08-19 22:46 ` Mikael Magnusson

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).