From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,MALFORMED_FREEMAIL,RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 12458 invoked from network); 4 Jun 2020 11:51:45 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2020 11:51:45 -0000 Received: (qmail 6137 invoked by alias); 4 Jun 2020 11:51:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24901 Received: (qmail 27474 invoked by uid 1010); 4 Jun 2020 11:51:33 -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.3/25828. spamassassin: 3.4.4. Clear:RC:0(205.235.26.22):SA:0(-0.8/5.0):. Processed in 2.060761 secs); 04 Jun 2020 11:51:33 -0000 X-Envelope-From: SRS0=NrX7=7R=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: bz.t2RQVM1mjv6YNGx55sTJYJ02BYneE1Ergs_geXyvxBo1pvp7aiYs5q5QBLjB a1YzLirOo6mmRadmgCeQx22xeg3jaYn8AMWq6XAHIXPVpj96N.S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GlCgy2NC_lUcG KU3WrFNzfrBKLMw.fCpjmKTQpVyzp_I7zeB4tSNb7fQNB5G2F0IPdixwL2Toyo72w91hKA0GL8Oe EKu19VfgHd7FUDkU735EzIilvnuXcjsjzULNCW_fR_wRQCYSuTpEHNmxjUbwdxDdiSOWDGbMPBsT blrUeM225NBpbCePHVusyOgUtrs3Pb9.ksZXD9HwgugQiGmcX1yQRvilemmR04SSS4049b2fJ4JB m.cgnbH4M1fc- cc: Daniel Shahaf , zsh-users@zsh.org In-reply-to: From: Oliver Kiddle References: <20200603005555.304cca04@tarpaulin.shahaf.local2> To: Paul Ruane Subject: Re: Cryptsetup completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <56543.1591271448.1@hydra> Date: Thu, 04 Jun 2020 13:50:48 +0200 Message-ID: <56544-1591271448.415496@8V8i.speh.Bt-A> X-Mailer: WebService/1.1.16037 hermes_yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.6) Paul Ruane wrote: > The new patch--in correct format :)--is here: Thanks > +++ b/Completion/Linux/Type/_crypto_ciphers These are just the cyphers handled by the Linux kernel, right? Is this naming perhaps too generic? _linux_ciphers perhaps? We wouldn't want them to be used in other cases where something else such as openssl ciphers are wanted. Does anyone know for what other commands these might be relevant? If there are none, then I would contradict Daniel about factoring them out. > +cipher_list=( ${${${(M)${(s:name:)${(M)${(f)"$( cipher*}#*: }%% *} ) > + > +_describe -t ciphers 'cipher' cipher_list The _describe function is there to make it easier to format lists containing both matches and descriptions. From my testing, this cipher_list array is only a list of matches. So it is much more efficient to just do: local expl _description ciphers expl cipher compadd "$@" "$expl[@]" -a cipher_list I know that looks slightly longer but it is doing much less underneath so is more efficient. Oliver