Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.0.8: git completion update for cherry-pick
- X-seq: zsh-workers 36353
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Mateusz Karbowy <mateusz.karbowy@xxxxxxxxx>
- Subject: Re: PATCH: 3.0.8: git completion update for cherry-pick
- Date: Tue, 1 Sep 2015 04:19:25 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=nMvEwvAxQ4KJErlqkAC2gtcqPys=; b=FCUEFp YaVVZzE+482e5DWRt6XKwkDV8WUwjXCDNsl+wpUn8uxcWt2w3ky4PR8kYd0irRhA 0W+CGPZQkrfmvxMb6QkF7nVGhKHIGYcAF7Xpm75LidlHaSdM8rnRu2l/LIcQHNgM pNjHS5ILGlwlFPCrASN0JUwpTAsVO0AIOqwoU=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=nMvEwvAxQ4KJErlqkAC2gtcqPys=; b=HYloZ 5s3chc4qSS2Zqsov7FoF5nrdz+U0W2UJtfNJFF3iXZVDlWaOQJPa/fGyHn3i4oOa ojXpOn8w3MPscNc7hWIX9cidQyOBsvmApi6MgelrECu/Yq9HFJ7hc94cEYq14ywp xht08WRv+2E7B+uHA9ul8QD89aIGCKm2HLvMxg=
- In-reply-to: <20150830223945.GC12415@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAFiR=Jv1ycq5jWvbyHQX=Csjyv8H1xSUKA45Mj6152Why5qhjg@mail.gmail.com> <20150722115307.GC2171@tarsus.local2> <CAFiR=JvJefLthQnoQ2YY-nQF69jgAXo76dzMit7sBRBZVgiq_Q@mail.gmail.com> <20150827231152.GD21994@tarsus.local2> <150827161952.ZM1496@torch.brasslantern.com> <20150827232856.GF21994@tarsus.local2> <CAFiR=Jt0msq78gUyitXViLO4vRmA1b=WKUs4mTp01DLgLheoGg@mail.gmail.com> <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!
Messages sorted by:
Reverse Date,
Date,
Thread,
Author