From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 795a23b5 for ; Fri, 3 Jan 2020 21:54:19 +0000 (UTC) Received: (qmail 9462 invoked by alias); 3 Jan 2020 21:54:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45218 Received: (qmail 24323 invoked by uid 1010); 3 Jan 2020 21:54:14 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25677. spamassassin: 3.4.2. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 2.117488 secs); 03 Jan 2020 21:54:14 -0000 X-Envelope-From: SRS0=aVPr=2Y=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at bounces.park01.gkg.net designates 205.235.26.22 as permitted sender) X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 X-YMail-OSG: 3PVYadoVM1mMXE4A0me7Shb9s5i9CyZbBzk364RbJOILSxdb3VEILDbbuw6EfAR kz6pIO72k0hbTULdBLVNG0H68omlM3hy4skEOpUf6R7l.sMKO9oar.PiaEzU5VKnzFsAj4OE.3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cHa9F83PVu7rcSqsX3S1XG1Qy8LntN0fMH9kQeE8rd9LFM_Yk8plZBPN9pIl RQ8CMYyl_hCOvY2ZUmH8BGXnMOZBuwTUgbwLlc1a9JRsgLjfXt7QzoGs3UN.lf8an1qO9m0jqqAj wBlwbjkRLkL_2MTqU5YXytvBTZDX3LnIzJjaCD8wOaHzRTTB.ZxOhx.aSk4NpcpiSZU3HkWfCV5z 0lYw- From: Oliver Kiddle To: Zsh workers Subject: PATCH: add more options to swaks completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <98223.1578088402.1@hydra> Date: Fri, 03 Jan 2020 22:53:22 +0100 Message-ID: <98224-1578088402.826899@ReF5.9OVB.VgF_> References: <98224-1578088402.826899.ref@ReF5.9OVB.VgF_> X-Mailer: WebService/1.1.14873 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) I needed to use swaks recently including some of the options that aren't covered by the completion. This adds a few more, mostly TLS related, options but the function remains incomplete. Oliver diff --git a/Completion/Unix/Command/_swaks b/Completion/Unix/Command/_swaks index a0ffb53ad..0e92221bd 100644 --- a/Completion/Unix/Command/_swaks +++ b/Completion/Unix/Command/_swaks @@ -1,5 +1,8 @@ #compdef swaks +local ign + +(( $#words > 2 )) && ign='!' _arguments \ '(-s --server -p --port)'{-s+,--server=}'[target host[:port\]]:host[\:port]:_hosts' \ '(-p --port)'{-p+,--port=}'[target port number]:port number:(25 465 587)' \ @@ -27,14 +30,27 @@ _arguments \ ESMTPS\:EHLO\ STARTTLS\ 25 ESMTPSA\:EHLO\ STARTTLS\ 25\ authenticated ))' \ - '-tls[TLS required]' \ - '(-tlsos --tls-optional-strict)'{-tlsos,--tls-optional-strict}'[TLS iff offered by target]' \ + '(-tls -tlsos --tls-optional-strict)-tls[TLS required]' \ + '(-tls -tlsos --tls-optional-strict)'{-tlsos,--tls-optional-strict}'[TLS iff offered by target]' \ '(-tlsc --tls-on-connect)'{-tlsc,--tls-on-connect}'[TLS on connect (port 465)]' \ '(-tlsp --tls-protocol)'{-tlsp,--tls-protocol=}':TLS protocol:(sslv2 sslv3 tlsv1 tlsv1_1 tlsv1_2)' \ '-tls-cipher:OpenSSL cipher string: ' \ '--tls-verify[verify TLS certificates]' \ '--tls-ca-path=:OpenSSL CAfile or CAdir:_files' \ '--tls-get-peer-cert=-:file to write (omit for STDOUT)' \ + '(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-a+,--auth=}'[use authentication, failing if no common auth-types found]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \ + '(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-ao,--auth-optional=}'[use authentication if common auth-types found]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \ + '(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-aos,--auth-optional-strict=}'[use authentication]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \ + '(-ap --auth-password)'{-ap,--auth-password=}'[provide the password to be used for authentication]::password' \ + \*{-ae,--auth-extra=}'[add extra information to authentication process]: :_values keywords + {realm,domain,dmd5-{serv-type,host,serv-name}}\:value' \ + \*{-am,--auth-map=}'[map alternate names for authentication types]:alias=type,...' \ + '(-apt --auth-plaintext)'{-apt,--auth-plaintext}'[show auth strings in plaintext when printing on screen]' \ + '(-ahp --auth-hide-password)'{-ahp,--auth-hide-password}'[replace passwords with dummy string when printing to terminal]' \ '(-d --data)'{-d+,--data=}'[specify DATA payload]:filename (or string with tokens):_files' \ '*'{-ah,--add-header=}'[add headers]:
\: Value' \ - '*'{-h,--header=}'[replace headers]:
\: Value' + '*'{-h,--header=}'[replace headers]:
\: Value' \ + "${ign}(-)--support[display capabilities and exit]" \ + "--dump[display results of option processing but send no mail]" \ + "${ign}(-)--help[display usage information]" \ + "${ign}(-)--version[display version information]"