zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: "Jesper Nygårds" <jesper.nygards@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Add _gradle for gradle and gradlew completion.
Date: Sat, 24 Mar 2012 12:14:41 +0100	[thread overview]
Message-ID: <CAHYJk3TL73yjCpJ7ArH81J9nN3r=TVCXknX9prtcaRrzAXA2og@mail.gmail.com> (raw)
In-Reply-To: <CABZhJg__v4hN_9D+KCdwrBA0E06UB2C2w2grtdLw=c=zxkuhiw@mail.gmail.com>

On 24 March 2012 11:55, Jesper Nygårds <jesper.nygards@gmail.com> wrote:
> 2012/3/24 Mikael Magnusson <mikachu@gmail.com>:
>> The patch seems (extensively) mangled, you can't post patches by
>> pasting them in the gmail web interface. You can either attach the
>> patch, or use git send-email.
>
> OK, I try again, with the patch attached.

You're defining a single function with the same name as the autoloaded
function, and then calling it, that serves no purpose so you can just
remove that indirection. (It's used in completers that want to define
extra helper functions). You could move the _gradle_caching_policy to
the toplevel and then this pattern would make sense. (There's no
namespaces for functions, so even though you define it inside _gradle
now, it stays around after _gradle returns.)

zstyle -T ":completion:*:*:$service:*" gradle-inspect || gradle_inspect=no
can probably be
zstyle -b ":completion:*:*:$service:*" gradle-inspect gradle_inspect
but I didn't test. :)

You need to quote the ? in -?,-h,--help. (The completion system sets
the nullglob option, so the whole argument just disappears without
errors).

Other than that it looks pretty good to me.

-- 
Mikael Magnusson


  reply	other threads:[~2012-03-24 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 10:28 Jesper Nygårds
2012-03-24 10:39 ` Mikael Magnusson
2012-03-24 10:55   ` Jesper Nygårds
2012-03-24 11:14     ` Mikael Magnusson [this message]
     [not found]       ` <CABZhJg9xgaM7mr4dy8GYKHopAofnVRCzZmxfOsEca1VNugv6Cw@mail.gmail.com>
2012-03-24 22:04         ` Jesper Nygårds
2012-03-24 22:16           ` Mikael Magnusson
     [not found]             ` <CABZhJg_Aamsf57nhBFEvc0LX-pmOkrfRtGMccJo_Uwt=hoNQ6w@mail.gmail.com>
2012-03-25 14:23               ` Jesper Nygårds
2012-03-25 14:25             ` Jesper Nygårds
2012-03-25 14:51               ` Mikael Magnusson

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='CAHYJk3TL73yjCpJ7ArH81J9nN3r=TVCXknX9prtcaRrzAXA2og@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=jesper.nygards@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).