Zsh Mailing List Archive
Messages sorted by:
Re: Completion error message
- X-seq: zsh-users 23103
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Completion error message
- Date: Fri, 26 Jan 2018 08:21:47 +0100
- 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==
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <firstname.lastname@example.org> <email@example.com>
On Thu, Jan 25, 2018 at 9:24 PM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Daniel Shahaf wrote:
>> «rsync -4 -6 --<TAB>» does nothing and prints nothing.
>> I get why it _does_ nothing — -4 and -6 are mutually exclusive, so the
>> command line is invalid and it makes no sense to continue — 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<tab>
---- no match for: `script file', `directory', or `option'
And it's also sort of surprising that _complete_help does nothing at all.
Messages sorted by: