From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17166 invoked from network); 11 Nov 2005 04:01:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Nov 2005 04:01:16 -0000 Received: (qmail 87715 invoked from network); 11 Nov 2005 04:01:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Nov 2005 04:01:09 -0000 Received: (qmail 11267 invoked by alias); 11 Nov 2005 04:01:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21998 Received: (qmail 11250 invoked from network); 11 Nov 2005 04:01:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Nov 2005 04:01:04 -0000 Received: (qmail 87524 invoked from network); 11 Nov 2005 04:01:04 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 11 Nov 2005 04:01:03 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 2A5E77C08C; Thu, 10 Nov 2005 23:01:00 -0500 (EST) Date: Thu, 10 Nov 2005 23:01:00 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _gnutls Message-ID: <20051111040100.GA13903@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Completion based on gnutls 1.2.8. Index: Completion/Unix/Command/_gnutls =================================================================== RCS file: Completion/Unix/Command/_gnutls diff -N Completion/Unix/Command/_gnutls --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Unix/Command/_gnutls 11 Nov 2005 03:59:20 -0000 @@ -0,0 +1,67 @@ +#compdef gnutls-cli gnutls-cli-debug + +local _gnutls_supported _gnutls_supported_certtypes +local _gnutls_supported_protocols _gnutls_supported_macs +local _gnutls_supported_kx _gnutls_supported_comp +local _gnutls_cli_common_args + +_gnutls_cli_common_args=( + '(-d --debug)'{-d,--debug}':debug level' + '(-p --port)'{-p,--port}':port' + '(-h --help)'{-h,--help}'[help]' \ +) + +case "$service" in + (gnutls-cli) + +_gnutls_supported="$(gnutls-cli --list)" +_gnutls_supported_certtypes=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Certificate types:*}#Certificate types: }}) +_gnutls_supported_protocols=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Protocols:*}#Protocols: }}) +_gnutls_supported_ciphers=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Ciphers:*}#Ciphers: }}) +_gnutls_supported_macs=(${(s:, :)${${(M)${(f)_gnutls_supported}:#MACs:*}#MACs: }}) +_gnutls_supported_kx=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Key exchange algorithms:*}#Key exchange algorithms: }}) +_gnutls_supported_comp=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Compression methods:*}#Compression methods: }}) + +_arguments \ + "$_gnutls_cli_common_args[@]" \ + '(-r --resume)'{-r,--resume}'[resume session]' \ + '(-s --starttls)'{-s,--starttls}'[start TLS on EOF or SIGALRM]' \ + '--crlf[Send CR LF instead of LF]' \ + '--x509fmtder[Use DER format for certificates to read from]' \ + '(-f --fingerprint)'{-f,--fingerprint}'[send the openpgp fingerprint instead of the key]' \ + '--disable-extensions[disable all the TLS extensions]' \ + '--xml[print the certificate information in XML format]' \ + '--print-cert[print the certificate in PEM format]' \ + '--recordsize:maximum record size to advertise:' \ + '(-V --verbose)'{-V,--verbose}'[more verbose output]' \ + '--ciphers:ciphers to enable:('"$_gnutls_supported_ciphers"')' \ + '--protocols:protocols to enable:('"$_gnutls_supported_protocols"')' \ + '--comp:compression methods to enable:('"$_gnutls_supported_comp"')' \ + '--macs:MACs to enable:('"$_gnutls_supported_macs"')' \ + '--kx:key exchange methods to enable:('"$_gnutls_supported_kx"')' \ + '--ctypes:certificate types to enable:('"$_gnutls_supported_certtypes"')' \ + '--x509cafile:certificate file to use:_files' \ + '--x509crlfile:CRL file to use:_files' \ + '--pgpkeyfile:PGP key file to use:_files' \ + '--pgpkeyring:PGP key ring file to use:_files' \ + '--pgptrustdb:PGP trustdb file to use:_files' \ + '--pgpcertfile:PGP public key (certificate) file to use:_files' \ + '--x509keyfile:X.509 key file to use:_files' \ + '--x509certfile:X.509 certificate file to use:_files' \ + '--srpusername:SRP username to use' \ + '--srppasswd:SRP password to use' \ + '--insecure[do not require server cert validation]' \ + '(-l --list)'{-l,--list}'[print list of the supported algorithms/modes]' \ + '(-v --version)'{-v,--version}'[print version number]' \ + '--copyright[print license]' \ + ':hostname:_hosts' + + ;; + (gnutls-cli-debug) + +_arguments \ + "$_gnutls_cli_common_args[@]" \ + '(-v --verbose)'{-v,--verbose}'[more verbose output]' \ + ':hostname:_hosts' + +esac