Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion error message
- X-seq: zsh-users 23105
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Completion error message
- Date: Sun, 28 Jan 2018 22:16:38 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- 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==
- In-reply-to: <CAH+w=7YaRQAgdHzUE-YF+XZoLobiT=gynoY9imuUYriytPYMhQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20180125155058.ukg4xupxl37e7srk@tarpaulin.shahaf.local2> <9267.1516911872@thecus.kiddle.eu> <CAHYJk3TADwQqfYShHTfTc5MmQLAyToMtKgNMGSPWBcbpSsjg6Q@mail.gmail.com> <CAH+w=7YaRQAgdHzUE-YF+XZoLobiT=gynoY9imuUYriytPYMhQ@mail.gmail.com>
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 <tab>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author