From: Bruno Bonfils <asyd@debian-fr.org>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: GPG completion function
Date: Mon, 17 Sep 2001 18:15:57 +0200 [thread overview]
Message-ID: <20010917181557.A11187@debian-fr.org> (raw)
In-Reply-To: <3BA60396.7EB63F80@yahoo.co.uk>; from okiddle@yahoo.co.uk on Mon, Sep 17, 2001 at 03:07:18PM +0100
[-- Attachment #1: Type: text/plain, Size: 3576 bytes --]
Le lun 17 septembre, Oliver Kiddle a écrit :
> Bruno Bonfils wrote:
> >
> > i submit you my first completion function (for gpg)
> >
> > i don't have finish completely, but i send you in order
> > to have comments/idea.
>
> Looks good. Let us know when it is finished and we can include it in
> the distribution.
>
> > _any_ comments/ideas are welcome
>
> Mainly it looks fine. I've added a few comments though within limits as
> I'm not familiar with usage of gpg.
>
> > local context state line
>
> You only need these declared if you use states with _arguments. With -C
> to _arguments the form would be slightly different actually. I suspect
> the final version may use states though.
>
i believe that some functions declared this var without using them. That's why
i write this line
> > typeset -A opt_args
>
> I think you only need this if you're going to use it.
>
ok
> > local keys_list
>
> You don't need that any more but `name' needs to be declared local.
>
yes, i forgot to remplace keys_list by name (grrr)
> > # i must rewrite this line using pattern matching
> > for name in `gpg --list-keys | awk '/^pub/ { print $NF }' | tr "<|>" -d`
> > do
> > compadd "$name";
> > done
>
> As you say in the comment this could be rewritten with a zsh
> substitution using pattern matching. You then shouldn't need the for
> loop. It could do with then using _wanted with the compadd to assign a
> tag and description. Also, you will need to redirect stderr from gpg
> --list-keys so anyone who hasn't used gpg ever will get nothing
> completed instead of error messages.
i need to read and reread doc, i have some difficulty with pattern matching
>
> > _arguments -C -s \
> > '-a[create ASCII armored output]' \
> > '-o[write output to file]:_files attachment:_files' \
>
> Your description on that line and others is messed up. I'd need to know
> more about gpg usage but the file attachment maybe could be completed
> with a '1' or '*' spec to _arguments.
>
i don't understand completely. you mean that i delete all descriptions
(which comes from gpg's manpage) ?
> > '-u[use name as the user ID to sign]'\
>
> I think that needs to be -u+[... The plus indicates that the username
> can be specified imediately after -u without a space, or a space can be
> used.
>
ok
> > '-s[sign a file]:file attachment:_files' \
>
> I see that options like this have a long form as well. Zsh 4.1.x can
> recognise this and list them together so I'd suggest using something
> like: '(-s --sign)'{-s,--sign}'[sign a file]:file attachment:_files'
ok
it is possible to tell zsh there maybe more than 1 file after the
option ?
> It seems that you still have a few gpg options to add to it. There are
> also
> no exclusion lists - I take it that -e and -s can not be used together
> for example.
>
> I hope that is helpful
>
Thank you very
I'm sorry for my mistakes (i'm beginner, i use zsh since 2 months) and for
my __very__ poor english
> Oliver
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Scanning Service. For further information visit
> http://www.messagelabs.com/stats.asp
--
Bruno Bonfils
Admin Sys Linux
http://www.darksnow.org http://www.debian-fr.org
Si la connerie était cotée en bourse,tu serais incarcéré pour
délit d'initié...
-+- EB in: Guide du Cabaliste Usenet - Les initiés ont la cote -+-
[-- Attachment #2: Type: application/pgp-signature, Size: 249 bytes --]
next prev parent reply other threads:[~2001-09-17 16:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-16 22:05 Bruno Bonfils
2001-09-17 14:07 ` Oliver Kiddle
2001-09-17 14:17 ` Bruno Bonfils
2001-09-17 16:15 ` Bruno Bonfils [this message]
2001-09-17 19:45 ` new version of " Bruno Bonfils
2001-09-18 13:43 ` Oliver Kiddle
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=20010917181557.A11187@debian-fr.org \
--to=asyd@debian-fr.org \
--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).