From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20388 invoked by alias); 28 Jan 2018 21:33:08 -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: 23105 Received: (qmail 3152 invoked by uid 1010); 28 Jan 2018 21:33:08 -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.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.7/5.0):. Processed in 4.222579 secs); 28 Jan 2018 21:33:08 -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=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=Jcna=EX=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1517174805; bh=dtetjZe2EEgoDC/t86PI/+nugGTr5WzVCE+KdO7mn44=; h=From:References:To:Subject:Date:From:Subject; b=TjTbs6xgAxaSLxCGHSM0fqb3jPFouaZJXTBBc6Rw1dVXs8rVy04di+WjUQ3TBTiC9yAYKUVW8B1DMULZBTA4HiHyS8wNeOtee/wdesAnhWBon5JU5tTj+4FKVUD5AiU6MKMYC9qRTBmOZ6vjWd27O85uQVKcp2a19YNQq7/aI8HzjZbXhvcc/U5gf8eIvhS0gf34NfWdl6kOtm3ErE3EJ7cjh9/7jqMZFICopA59Ks4H7oVKQl+QHtv5Iw3h/Lh57SIWMT7dpTf49A1U6yPw+5yY3iXbjktf3XRoh1aAA1LH4f0lVo4aYtWWs3AvWkgFUlBSG674DrfFMdc1K71Mcw== X-YMail-OSG: IC3oc5oVM1nuPleTPSQMl5LPrZnKwacHnnAtQ2FTPK25o8aAQB6rqVJLVG6GyRC jrjVPwAg4s8V_dzIQtf8oMsr_qVXuPciY7VnKf0.fYu_79W5Lklf0MKoUKgHR8pn6P7wRJ7N9Z1u SvuTNsk4cisPt.zTvzW6WeDzq5HFjQYDhUtnVjjTr2vCmAoP61ZRAP0WR_SlzUZn.6CPRBw0zWTH YtBnYU0syp5rDnUjXV_hYjeliiHYygryxT42L8mAMyxjl4NECbiOMk9nARVpU5kUGXU6tmZZyokr uM1RerjzcHW3Fd9XaWmV8eTp3pr6jl8KW.Q8cVOtMxckxU9tkNjfNMJyBi0qsehoIRC36m.JdHpR lriXweNTgO1URowE9GUFdXltXlE0TK8uT8AvKl59fdb7d1dyrH4OHhSpL61jNNyJkQBVgTy_Fb8k z8ps5vQg9ak5FGUm_WYOH09xGUVzWCPFjw_x.BDn5oq5O3zhVUoGe1KLfmpKS25qCWgPoAJOVXCf OK6VrV93FCQ-- In-reply-to: From: Oliver Kiddle References: <20180125155058.ukg4xupxl37e7srk@tarpaulin.shahaf.local2> <9267.1516911872@thecus.kiddle.eu> To: Zsh Users Subject: Re: Completion error message MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1359.1517174198.1@thecus.kiddle.eu> Content-Transfer-Encoding: 8bit Date: Sun, 28 Jan 2018 22:16:38 +0100 Message-ID: <1360.1517174198@thecus.kiddle.eu> Bart wrote: > You only get the "no match for: ..." text if you have set the > appropriate zstyle. It also implies that a tag loop was run for particular tags even if there were no matches. > How about this? > > BartMAC2014% zstyle ':completion:*:messages' format %S%d%s > BartMAC2014% rsync -4 -6 -- > no valid completions If this is useful, then it might as well be done at the top-level in _main_complete, perhaps controlled by a format style. Any function can produce no matches and not even run through a tag loop–it isn't unique to _arguments. There's a variety of different conditions that cause comparguments -i to return 1 besides all sets being disabled. For a very simple example, take an arguments spec consisting of just options with no rest arguments, e.g: _foo() { _arguments -a }, then try completion following a non-option argument, e.g. foo arg If _arguments is used in conjunction with another function (uncommon but there are uses), the message would be unwanted. Only generating it from _main_complete allows you to be sure there were no matches at all. Oliver