From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4419 invoked by alias); 28 Jan 2018 02:16:59 -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: 23104 Received: (qmail 16516 invoked by uid 1010); 28 Jan 2018 02:16:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf0-f53.google.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(209.85.215.53):SA:0(-1.9/5.0):. Processed in 2.318387 secs); 28 Jan 2018 02:16:58 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DuqW/nJ9KIOf2Lp+jbQR59xeoszlDXZAKZJGeWvbdEo=; b=ZEvvq25AHMqwysT+L2tpMYar8IuexxhWSPByvRb67tEXbRM4EptRfwDQkjWOsiryaf dgAad13NpHnFtJSIXmXaltqGVlhyIpRZ4QNdFuXvDhGhXkbauWjPOz9szraIfm02Ykus B1tFUZtQsy6ZnMQFbDrC/AG3FfuikpuJilaeip96Hiaa0ilYC1OqTyH07N1ZiSpK/0cY 1+G8J8N8NjxWQsrIBlieLuFvgpP0s/myF6iiJaWQQ6XhuA9oqEavvFXsZDLDTZ9Hxt08 Zp7s6aCaFq1NbxJ4OWfEzRRZfzIhKsX57/MV0EqJP6EkzpAfIbWSq1vP+/cc47OMFpPO ngnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DuqW/nJ9KIOf2Lp+jbQR59xeoszlDXZAKZJGeWvbdEo=; b=tay116Pyjgf0FyHHYUBsvi6kN9Fw5oifqIHOqxf9Y7HpGu/gI8JWaerWwFwX7CxKpt mXkXK5aoAPOpWOb/QWeNuW32UwKX07CKkd9OXzusUDtVpJnMEP3okVEy0uymfYzo+reO hkz8+ET3kFBXb9AHjUdPkhW7tEuCa2J7YOW1UjKh05Pw24TinAPUagsw78knUvhpmWhZ X8QE692n4VRD1QAc3GH/sOCgoIlBrnvi6pAFF10e2YScwZTq44s94uFuinK123HTek6o eRF3WfJeSbDc67Md6Rp9P5RuJDartSn+RNLFLUNf9OFwkuhQfzyQqJiYbO0TtsJRx1x6 KwRg== X-Gm-Message-State: AKwxytexv1J9XW25r+JL59+mfwGxZ39dnbmEkv1yY8NPNH5wvdSVhdYX dEwRoG0J1l9cR1sZJWgPJvsgG4AqreMBx0jcqplSVA== X-Google-Smtp-Source: AH8x224FHQiAnRowm8GjJ6vcLUxsKekVzwPSNhXsLK0y5AAwzoarfBprVQT+WGfcDPY5eLezpZP4LeW8HdXGsTfWRl8= X-Received: by 10.25.125.3 with SMTP id y3mr10178421lfc.32.1517105811439; Sat, 27 Jan 2018 18:16:51 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20180125155058.ukg4xupxl37e7srk@tarpaulin.shahaf.local2> <9267.1516911872@thecus.kiddle.eu> From: Bart Schaefer Date: Sat, 27 Jan 2018 18:16:51 -0800 Message-ID: Subject: Re: Completion error message To: Mikael Magnusson Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 25, 2018 at 11:21 PM, Mikael Magnusson wrot= e: > On Thu, Jan 25, 2018 at 9:24 PM, Oliver Kiddle wrot= e: >> Daniel Shahaf wrote: >>> =C2=ABrsync -4 -6 --=C2=BB does nothing and prints nothing. >> >> The inactive option (-6) is seen as an invalid argument when parsing for >> each of the two sets. Both sets get disabled and there's no completion. >> As I mentioned in 40129, we could do something with marking sets for >> fallback and examine them twice. >> >> I'm not especially keen on producing error messages from completion. > > For most other commands you get > % zsh --aoentuh > ---- no match for: `script file', `directory', or `option' > > And it's also sort of surprising that _complete_help does nothing at all. You only get the "no match for: ..." text if you have set the appropriate zstyle. However, the lack of both help and description is directly connected to what Oliver was explaining. Because all possible sets of completions are excluded, _arguments never calls _description and there is nothing for _main_complete to report as the context. How about this? BartMAC2014% zstyle ':completion:*:messages' format %S%d%s BartMAC2014% rsync -4 -6 -- no valid completions It may have other unintended side-effects, though. diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments index 136dd58..7b2bd40 100644 --- a/Completion/Base/Utility/_arguments +++ b/Completion/Base/Utility/_arguments @@ -583,5 +583,6 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then [[ nm -ne "$compstate[nmatches]" ]] else + _message "no valid completions" return 1 fi