zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Mateusz Karbowy <mateusz.karbowy@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: PATCH: 3.0.8: git completion update for cherry-pick
Date: Tue, 1 Sep 2015 04:19:25 +0000	[thread overview]
Message-ID: <20150901041925.GA5755@tarsus.local2> (raw)
In-Reply-To: <20150830223945.GC12415@tarsus.local2>

Daniel Shahaf wrote on Sun, Aug 30, 2015 at 22:39:45 +0000:
> I've made a few changes (see attached series):
...
> 3. Extra safety check in case somebody passed just the traditional '-O
> expl' with no colon
...
> -  (( $#argument_array_names > 1 )) && commit_opts=( "${(@P)argument_array_names[2]}" )
> +  (( $#argument_array_names > 1 )) && && ${(P)+argument_array_names[2]} &&
> +    commit_opts=( "${(@P)argument_array_names[2]}" )

That was an invalid syntax.

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2c79ed0..7f7c3eb 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5645,7 +5645,7 @@ __git_recent_commits () {
   zparseopts -D -E O:=argument_array_names
   # Turn (-O foo:bar) to (foo bar)
   (( $#argument_array_names )) && argument_array_names=( "${(@s/:/)argument_array_names[2]}" )
-  (( $#argument_array_names > 1 )) && && ${(P)+argument_array_names[2]} &&
+  (( $#argument_array_names > 1 )) && (( ${(P)+argument_array_names[2]} )) &&
     commit_opts=( "${(@P)argument_array_names[2]}" )
 
   # Careful: most %d will expand to the empty string.  Quote properly!


      parent reply	other threads:[~2015-09-01  4:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18 22:19 Mateusz Karbowy
2015-07-22 11:53 ` Daniel Shahaf
2015-08-10 21:31   ` Mateusz Karbowy
2015-08-11 22:06     ` Daniel Shahaf
2015-08-19 17:10       ` Mateusz Karbowy
2015-08-21 19:55         ` Mateusz Karbowy
2015-08-23  6:42           ` Daniel Shahaf
2015-08-25 22:26   ` Mateusz Karbowy
2015-08-27 23:11     ` Daniel Shahaf
2015-08-27 23:19       ` Bart Schaefer
2015-08-27 23:28         ` Daniel Shahaf
2015-08-29 16:53           ` Mateusz Karbowy
2015-08-30 22:39             ` Daniel Shahaf
2015-08-31  7:50               ` Mateusz Karbowy
2015-09-01  4:19               ` Daniel Shahaf [this message]

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=20150901041925.GA5755@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=mateusz.karbowy@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).