From: "Renato Botelho" <rbgarga@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Re: Contributing with Completions
Date: Sun, 22 Jul 2007 12:34:55 -0300 [thread overview]
Message-ID: <747dc8f30707220834g7bf2f65fja92f0a3c6bcb3d7d@mail.gmail.com> (raw)
In-Reply-To: <20070722113455.GA4684@scowler.net>
On 7/22/07, Clint Adams <clint@zsh.org> wrote:
> On Thu, Jul 19, 2007 at 10:01:34AM -0300, Renato Botelho wrote:
> > _portsnap -> Tool for get/update FreeBSD ports tree using snapshots
> >
> > Comments, suggestions, critics are welcome, like I said, these are my
> > first lines in zsh since i'm using it for less than a week.
>
> When you use ->state, you should declare the scope of the parameters
> context, state, line, opt_args.
>
> Index: Completion/BSD/Command/_portsnap
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/BSD/Command/_portsnap,v
> retrieving revision 1.1
> diff -u -r1.1 _portsnap
> --- Completion/BSD/Command/_portsnap 20 Jul 2007 16:39:15 -0000 1.1
> +++ Completion/BSD/Command/_portsnap 22 Jul 2007 11:12:05 -0000
> @@ -1,5 +1,8 @@
> #compdef portsnap
>
> +local context state line
> +typeset -A opt_args
> +
> flags=(
> '(cron)fetch[Fetch a compressed snapshot or update existing one]'
> '(fetch)cron[Sleep rand(3600) seconds, and then fetch updates]'
> @@ -17,7 +20,7 @@
> '-s:Server from which to fetch updates:_hosts' \
> '*:principal:->principal' && ret=0
>
> -if [[ $state = principal ]]; then
> +if [[ $state == principal ]]; then
> _alternative \
> ':file flag:_values -S " " -w "commands" $flags[@]' \
> '*:path:_files -/'
Thanks
--
Renato Botelho
prev parent reply other threads:[~2007-07-22 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 13:50 Renato Botelho
2007-07-19 4:37 ` Peter Stephenson
2007-07-19 13:01 ` Renato Botelho
2007-07-20 16:39 ` Peter Stephenson
2007-07-20 17:54 ` Renato Botelho
2007-07-22 11:34 ` Clint Adams
2007-07-22 15:34 ` Renato Botelho [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=747dc8f30707220834g7bf2f65fja92f0a3c6bcb3d7d@mail.gmail.com \
--to=rbgarga@gmail.com \
--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).