From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26305 invoked by alias); 25 Jul 2017 06:04:05 -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: X-Seq: 41454 Received: (qmail 26968 invoked from network); 25 Jul 2017 06:04:05 -0000 X-Qmail-Scanner-Diagnostics: from nm7-vm1.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.96.126):SA:0(-2.8/5.0):. Processed in 1.126255 secs); 25 Jul 2017 06:04:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.96.126 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1500962241; bh=Xc95w+YM1UbRf2pAqpBnISpvNrtw2Nj8opB0Q21ZRMM=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=I961Nlyc+2NYnS3t89kimd3+iioErOQpR0t+Zhjuxsp33TV7QJvjV0iQJvdWjNgCcCtoGN3O13RDUuj1FWuNNEYmSKu4wHQGe1s25/fGV8KcYvoLtYC52JTVC9bP7A8mr/O3fSG2kxdXwfQOpvYZiw0D6CgglBVv84xIgH1Wetvbs+aP2bmQfEnQNyKwC315DRtvlR3ESTD8t+2UVmRkCbspwiv0MCnxmmhlIlqx1jhDvo0JvYdjYerOCUByzDMiIaSuNtRMfWhJKfp96775mjpBbZlXnAcmjKjGvZYOVj6RNn6aFdmPVVtwsI5aeU8BaS6HQg8hIgjVMkF24JvjVw== X-Yahoo-Newman-Id: 402440.18140.bm@smtp118.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZZ21zeAVM1mqM7cfpy7Jm_XyWgCCSInErLIlZbMbFEn4Dfy 0fZXzYCM9xvnHJc2pip8iMtjQHO_QokR6l_I19H2rySJ.0PjyDTptEuTu0Fj Uk1.22m0_spDgPoyBAyXU9THrdJMyf1mqZWfl0AHl8jv0cTMf1fUfMjDtVQ6 rRcMUTSAgTJCnDuFJ_4Z82k8CSvfoAdNYSoeJcnJxs75w25YXCkGNAWfi6Ws 8wiroc_fAYEU4vRsSlan6Vp2Z9c60xMvd_WNCKQfvbk07qGzqzaNnlqq61z6 8KT9quJcLAxfWqPvFRokKbKcYkQsUU.b8TM.78VN7x2jAz7uyQmcHrRWZUIi Q9CRX.fmwfCt0t5SSS7pxxXJxWx.AjXObjsGWfgQkAflhj4sFDOws7NyNC8E NBowUWe5yGE0MvPdJ91fh1LPsJRVFT8nBUZaq.uAqCkIVbgmuSbxPt5SmE5r t9..hzEJDToABsjGyOpBb17jnR54T9hxN4T5fiob57l0v_jjn5UQcYEYUOpT dvtCELAf7eQnSaXXqMjZbjRQ5.Xi2nc5QPFIIh5tH X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <1500818487.2639605.1049794664.32ABA0EF@webmail.messagingengine.com> From: Oliver Kiddle References: <20170720210607.16753-1-danielsh@tarpaulin.shahaf.local2> <1500659163.916799.1048510048.293AC92C@webmail.messagingengine.com> <19454.1500796085@thecus.kiddle.eu> <1500818487.2639605.1049794664.32ABA0EF@webmail.messagingengine.com> To: zsh-workers@zsh.org Subject: Re: [PATCH v2] Correct completion of 'tmux new '. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24144.1500962240.1@thecus.kiddle.eu> Date: Tue, 25 Jul 2017 07:57:20 +0200 Message-ID: <24145.1500962240@thecus.kiddle.eu> Daniel Shahaf wrote: > How about: > > item(tt(_cmdambivalent))( > Completes the remaining positional arguments as an external command. > The external command is completed as word-separated arguments (in the manner of tt(/usr/bin/env)) I'd just say that the external command and its arguments are completed as separate [positional] arguments "word-separated" is a confusing term as "words" are not the separators. > if there are two or more remaining positional arguments on the command line, > and as a quoted command string (in the manner of tt(system+LPAR()...+RPAR())) othrewise. Fine aside from the otherwise typo. > See also tt(_cmdstring), tt(_cmdrest), and tt(_precommand). Assuming those three exist both in form and documentation.` > Makes sense. In addition to checking for spaces, we could also check > for an opening quote. (An opening quote is more likely to signify a > quoted shell command than an argv[0] with spaces.) Yes, that makes sense. > Why not document _precommand? Firstly, documenting it would help > Not quite what you meant to say, I think, but having that section of the > documentation grouped by logical function would make a lot of sense. > Right now, anyone who tries to understand _tags by RTFM'ing needs to We currently document functions in three sections: CONTROL FUNCTIONS BINDABLE COMMANDS UTILITY FUNCTIONS _precommand's primary purpose is not really as a utility function but any function can be treated as one. Maybe we could add another section or subdivide as you suggest. Certainly grouping all the tags/labels functions together might be an improvement. Oliver