From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17264 invoked from network); 17 Sep 2001 19:46:09 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Sep 2001 19:46:09 -0000 Received: (qmail 16351 invoked by alias); 17 Sep 2001 19:46:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15838 Received: (qmail 16340 invoked from network); 17 Sep 2001 19:46:01 -0000 Date: Mon, 17 Sep 2001 21:45:23 +0200 From: Bruno Bonfils To: zsh-workers Subject: Re: new version of GPG completion function Message-ID: <20010917214523.A14211@debian-fr.org> Mail-Followup-To: Bruno Bonfils , zsh-workers References: <20010917000505.A5637@debian-fr.org> <3BA60396.7EB63F80@yahoo.co.uk> <20010917181557.A11187@debian-fr.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4bRzO86E/ozDv8r1" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010917181557.A11187@debian-fr.org>; from asyd@debian-fr.org on Mon, Sep 17, 2001 at 06:15:57PM +0200 --4bRzO86E/ozDv8r1 Content-Type: multipart/mixed; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi all, i corrige my function i'm happy because i success to use pattern matching :) but there is yet some problems.. (like optionnel argument of an option, is there the -w option of _arguments ?) (Note : /join #zsh (OPN) ) --=20 Bruno Bonfils Admin Sys Linux http://www.darksnow.org http://www.debian-fr.org X windows c un concurrent de Windows Manager ? - #linuxfr --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_gpg #compdef gpg # Author : Bruno Bonfils # Date : Sept 2001 # Thanks to Oliver Kiddle and Denis Bodor _pub-keys-list () { local list list=(${${(Mo)$(gpg --list-keys 2>/dev/null):%<*>}//(<|>)/}) compadd $list } _sec-keys-list () { local list list=(${${(Mo)$(gpg --list-secret-keys 2>/dev/null):%<*>}//(<|>)/}) compadd $list } _arguments -C -s \ '-a[create ASCII armored output]' \ '-o[write output to file]:_files attachment:_files' \ '-u+[use name as the user ID to sign]:user attachment:_users'\ '(-b --detach-sign)'{-b,--detach-sign}'[make a detached signature]' \ '(-s --sign)'{-s,--sign}'[sign a file]:file attachment:_files' \ '(-e --encrypt)'{-e,--encrypt}'[encrypt data. this option may be combined with --sign]' \ '(-c --symetric)'{-c,--symetric}'[encrypt with symmetric cypher only]' \ '-h[help]' \ '--clearsign[make a clear text signature]' \ '--check-sigs[lists key, signatures and check them]:key attachment:_pub-keys-list' \ '--decrypt[decrypt file or stdin]:file attachment:_files' \ '--delete-key[remove key from public keyring]:key attachment:_pub-keys-list' \ '--delete-secret-key[remove key from public & private keyring]:key attachment:_sec-keys-list' \ '--delete-secret-and-public-key[remove key from private & public keyring]:key attachment:_sec-keys-list' \ '--edit-key[a menu for edit yours keys]:key attachment:_pub-keys-list' \ '--export[export all key from all keyrings]:key attachment:_pub-keys-list' \ '--export-all[export all key and not OpenPGP compatible keys]' \ '--export-ownertrust[list the assigned ownertrust values in ASCII format]' \ '--export-secret-keys[export a list of secret keys]:key attachment:_sec-keys-list' \ '--export-secret-subkeys[same as --export but export the secret keys instead]:key attachment:_sec-keys-list' \ '--fast-import[import a file without build trustdb]:_files attachment:_files' \ '--fingerprint[list all keys with their fingerprints]:key attachment:_pub-keys-list' \ '--gen-key[generate a new pair key]' \ '--gen-random[emit random bytes of the given level quality]' \ '--gen-prime[use the source, luke :-)]' \ '--import[import a gpg key from a file]:_files attachment:_files' \ '--import-ownertrust[update the trustdb with a file]:_files attachment:_files'\ '--keyserver[use server for send/recv keys]:_hosts attachment:_hosts' \ '--list-keys[list all keys]:key attachment:_pub-keys-list' \ '--list-public-keys[list all public keys]:key attachment:_pub-keys-list' \ '--list-secret-keys[list all secret keys]:key attachment:_pub-keys-list' \ '--list-packets[list only the sequence of packets]' \ '--list-sigs[lists keys and signatures]:key attachment:_pub-keys-list' \ '--lsign-key[sign a key but mark not is as non-exportable]:key attachment:_pub-keys-list' \ '--print-md[Print message digest of the given algorithm for all given files]' \ '--recv-keys[receive a list of keys from a keyserver]:key attachment:_pub-keys-list' \ '--send-keys[send keys to a keyserver]:key attachment:_pub-keys-list' \ '--sign-key[sign a key]:key attachment:_pub-keys-list '\ '--store[store only]' \ '--trusted-key[assume that the specified key is trustworthy]' \ '--verify[verify a signature]:file attachment:_files' \ '--verify-files[verify a list of files]:_files attachment_files' \ && return 0 return 1 --C7zPtVaVf+AK4Oqc-- --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Pour information voir http://www.gnupg.org iEYEARECAAYFAjumUtMACgkQ8dj4f/OdzPWpbACglXlpwnehYh1Tr3R5mNWeIp/W F1EAn2XS4E0YpGfDBXRgzS9sUAfY09Ep =yKgq -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1--