From: "Renato Botelho" <rbgarga@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Re: Contributing with Completions
Date: Thu, 19 Jul 2007 10:01:34 -0300 [thread overview]
Message-ID: <747dc8f30707190601v40917b5erdeb07e604d5d5fb4@mail.gmail.com> (raw)
In-Reply-To: <200707190437.l6J4bcLG031432@news01.csr.com>
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
On 7/19/07, Peter Stephenson <pws@csr.com> wrote:
> "Renato Botelho" wrote:
> > Hello all,
> >
> > I've started to use zsh 2 days ago on my FreeBSD Desktop, this is a
> > really great shell.
> >
> > I've written 2 Completions, and I would like to share it with the
> > community, how can I send this to be added in the project?
>
> Posting completion functions here is fine.
Nice,
So, here it is:
_csup -> csup is cvsup rewritten in C, it's on FreeBSD base system, i
don't know if NetBSD or OpenBSD are using it.
_portlint -> Tool for check FreeBSD ports syntax
_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.
I hope to contribute more.
Thanks
--
Renato Botelho
[-- Attachment #2: _portlint --]
[-- Type: application/octet-stream, Size: 742 bytes --]
#compdef portlint
_arguments -s \
'-a[additional check for scripts/* and pkg-*]' \
'-A[turn on all additional checks (equivalent to -abcNt)]' \
'-b[warn $(VARIABLE)]' \
'-c[committer mode]' \
'-C[pedantic committer mode (equivalent to -abct)]' \
'-g[group errors together to avoid duplication (disabled if -v is specified)]' \
'-h[show summary of command line options]' \
'-v[verbose mode]' \
'-t[nit pick about use of spaces]' \
'-N[writing a new port]' \
'-V[print the version and exit]' \
'-M:set make variables to ENV (ex. PORTSDIR=/usr/ports.work):_guard ".#" "environment vars"' \
'-B:allow # contiguous blank lines:_guard "[0-9]#" "numeric value"' \
':port directory:_files -/'
[-- Attachment #3: _csup --]
[-- Type: application/octet-stream, Size: 748 bytes --]
#compdef csup
_arguments -s \
'-1[disable automatic retries]' \
'-4[Force usage of IPv4 addresses]' \
'-6[Force usage of IPv6 addresses]' \
'-A:local address:_hosts' \
'-b:base directory:_files -/' \
'-c:collections directory:_files -/' \
'-d:maximum number of deleted files:' \
'-h:server host:_hosts' \
'-i:file pattern:' \
'-k[keep temporary copies of failed updates]' \
'-l:lock file:_files' \
'-L:verbosity level:(0 1 2)' \
'-p:port:_ports' \
'-r:maximum number of retries:' \
'-s[suppress status checks]' \
'-v[print version information]' \
'(-Z)-z[enable compression]' \
'(-z)-Z[disable compression]' \
':csup file:_files' \
':destination directory:_files -/'
[-- Attachment #4: _portsnap --]
[-- Type: application/octet-stream, Size: 915 bytes --]
#compdef portsnap
flags=(
'(cron)fetch[Fetch a compressed snapshot or update existing one]'
'(fetch)cron[Sleep rand(3600) seconds, and then fetch updates]'
'(update)extract[Extract snapshot, replacing existing files and dirs]'
'(extract)update[Update ports tree to match current snapshot]'
)
_arguments -C -s \
'-d:Store working files in workdir:_files -/' \
'-f:Read configuration options from conffile:_files' \
'-I[Update INDEX only. (update command only)]' \
'-k:Trust an RSA key with SHA256 hash of KEY:_files' \
'-l:Merge the specified local describes file into the INDEX:_files' \
'-p:Location of uncompressed ports tree:_files -/' \
'-s:Server from which to fetch updates:_hosts' \
'*:principal:->principal' && ret=0
if [[ $state = principal ]]; then
_alternative \
':file flag:_values -S " " -w "commands" $flags[@]' \
'*:path:_files -/'
fi
return ret
next prev parent reply other threads:[~2007-07-19 13:01 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 [this message]
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
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=747dc8f30707190601v40917b5erdeb07e604d5d5fb4@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).