From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21905 invoked by alias); 26 Jan 2018 07:21:54 -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: 23103 Received: (qmail 29525 invoked by uid 1010); 26 Jan 2018 07:21:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f182.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.216.182):SA:0(-2.6/5.0):. Processed in 3.519554 secs); 26 Jan 2018 07:21:54 -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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=iadQs8Px0bezQasHA0XU6gZUO/2Ny03uLh7ohN7maj0=; b=EawBNAJGziMHiuuuA692+b+E9/lXCpIpPtQDUPWhp2SOqQnDYjrMPJ20Apt/iDht8M Ticw6Nja68m8179Eqs5KOgO2/LrBdMJ5f1imhCi+RlLL4yvQjGXTVyIIg4TB1s+P/vHG 0PejLK8IK3cwuwWpDAzGsQl3qm2yom+1c7OKLn9rTe0RuaO2vaZzbIRV7/SGz3tRL66J nZ1/CoPejyi5dHHWYeoXXs7afH/qxwRduTtu+gonKzh4PknCl+n0Gf6f9XqbgurKZR7d HNLoeFJbjizH/DBx/7p9g4bsjgwDBpBZbEAyCnkx/P6lQxILcSdV2Ccm0yF2SGTlhfkL s+TQ== 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:content-transfer-encoding; bh=iadQs8Px0bezQasHA0XU6gZUO/2Ny03uLh7ohN7maj0=; b=mFsQwnNdGlF1aGZXwtbl2TPQGQkJboMrOjJD+gtQ9A/zTjxVqin10drbUePnNV2wJe xu8y1R4BcaXyzPQiy0sQhVUaP2IXWXc8QbmSGjv/o2u1xJ+/fWhGXTDrde+svUNf5WwF Zo2YidSV68d8tjPh0FZu35z9FdRt4iwk6od0gJYG0Ym777/hFmfVqO0OFBgUxFZTiHSP +QZCIpRw+U80x7kiH4px62sGPmSmLSetwKllE/dak1T7flayK6K/qXpnZhqo+GL+m5mJ DOAHDZTjGtAe5WFqXCAr5QcUoi03g5cFJVmb7GNKD+We7HSs7G0quXe8FIIbhK0l518a 2TyA== X-Gm-Message-State: AKwxytfkcvUhr5zvdhTDvHo0drfidMzvXNMqOm55Hj8ErpiqshJjRHQN z9PIdPZwDTsQZKSUCupgWxHKhs5b5spb2nieD4VNcw== X-Google-Smtp-Source: AH8x224PY76QDvyt2fdVFQtkHyRwzuLcYY145g3+43TJxCPXcxNST2ubMuRURtNCmIOJzYUJukznP/NYq9f6daGLD6U= X-Received: by 10.200.16.19 with SMTP id z19mr21990441qti.10.1516951307498; Thu, 25 Jan 2018 23:21:47 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <9267.1516911872@thecus.kiddle.eu> References: <20180125155058.ukg4xupxl37e7srk@tarpaulin.shahaf.local2> <9267.1516911872@thecus.kiddle.eu> From: Mikael Magnusson Date: Fri, 26 Jan 2018 08:21:47 +0100 Message-ID: Subject: Re: Completion error message To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 25, 2018 at 9:24 PM, Oliver Kiddle wrote: > Daniel Shahaf wrote: >> =C2=ABrsync -4 -6 --=C2=BB does nothing and prints nothing. >> >> I get why it _does_ nothing =E2=80=94 -4 and -6 are mutually exclusive, = so the >> command line is invalid and it makes no sense to continue =E2=80=94 but >> shouldn't it print an error message? > > Note that _rsync uses _arguments sets. Without sets, it will complete > further options. With sets, it is aggressive about disabling > sets such that it can narrow things to the intended set. Unfortunately, > that can easily result in all sets being deactivated. > > 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. > > This also affects things without sets, try this: > _arguments '(-6)-4' '(-4)-6' -a -b '1:arg1:(1)' '2:arg2:(2)' > > The -6 option gets taken as the first positional argument and '2' gets > completed. What do you think it should complete there? > Most commands don't like position arguments to look like options. > > 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. --=20 Mikael Magnusson