From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_SBL_CSS,
UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4
Received: (qmail 24531 invoked from network); 26 Aug 2020 10:57:54 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 26 Aug 2020 10:57:54 -0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org;
s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:
List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=MbT7ljhsdEZFARTBAkcOGWmPjF8Mp/a4+j5GA/Nx1cQ=; b=d62dLjAIWvH3rezN2DAJU7+HSf
SDj+OsHHIfHqpiPds+XGaHDqiurBpePLoUtn6apwHYPkiBOEmr4i0Yjs71VNZjjyCSGsnZ1Xg+yZD
pOh4ddd9azzKu3ir5o3YAfwh9rGtgHdfiBeLDsGqZrcuvEyRf6rWCTMW1PNGuADo0zVHVI/U2ywRL
mhesZTxFfTDGIaYZoKRHGL1u6zIIvQ/VpIUrLL6vtcwcGlugpbYIj+iwtVzMNmyUc0doVY6x3FkV+
D/7BVY/k74kCWpbXKka+N8rKozlUZHkMR1dqBrJLZYWoDYg3guHytjCGWjYTjj5MPkwgRMEhA03Ee
Y/snXBUw==;
Received: from authenticated user by zero.zsh.org with local
id 1kAt7o-000Hmu-M1; Wed, 26 Aug 2020 10:57:52 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=skipped;
arc=none
Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:47556)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
id 1kAt7M-000HPd-C6; Wed, 26 Aug 2020 10:57:24 +0000
Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net)
by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2)
(envelope-from
)
id 1kAt7K-0007J9-Uq
for zsh-users@zsh.org; Wed, 26 Aug 2020 12:57:22 +0200
Received: from oxbe24.tb.ukmail.iss.as9143.net ([172.25.160.155])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id At7Kk8An6dIiKAt7KkV8Zp; Wed, 26 Aug 2020 12:57:22 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-users@zsh.org
X-SourceIP: 172.25.160.155
X-CNFS-Analysis: v=2.4 cv=Hs/Ip2fS c=1 sm=1 tr=0 ts=5f464012
a=7eg3RIOFpSGgz8rG3xBEDw==:117 a=KEnZaF_ea6UA:10 a=IkcTkHD0fZMA:10
a=DoY9bV0jb9AA:10 a=pGLkceISAAAA:8 a=YRi4DkWnqQgc5-qsQ2sA:9 a=QEXdDO2ut3YA:10
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1598439442;
bh=jQBA59Hc2R3TowfGVcSkG2xc+mEjf3BqP+NVNFCOMUY=;
h=Date:From:To:In-Reply-To:References:Subject;
b=Xk+QQzgVBNoZDPvG8mbmCq6yEnku22hFy1P8eesoSxv+uQL/yvaog2wM02SlCKo7v
luhTVLvDQcduNFXQrm/IT4YlpIrWl05nrmtqRVhkGpfE1Sa0lcA6lhlX3L3PEHYIbV
DkUA/NaoPXOHz4DkxzCUUloZ04cjQONFq691730JVCjFxFeCCpPidO8oECNXh2RfG3
RUgpZ3Xx7cUdAJVtHe7AeouHRom10AiQCczXVGs7ANlGwtZ+lEBEkynbKmiz6h7huY
ObtMuXNPIYJK3sN2pKV4ca1LpfMnC2TKmzuMNsxdaqiLy6FCqcFWs8HMv6W3gtUkF1
UwIbdZ1A4sJlQ==
Date: Wed, 26 Aug 2020 11:57:22 +0100 (BST)
From: Peter Stephenson
To: Ahmad Ismail , zsh-users@zsh.org
Message-ID: <441849700.1433895.1598439442873@mail2.virginmedia.com>
In-Reply-To:
References:
Subject: Re: how to use tags in zsh completion system
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v7.8.4-Rev72
X-Originating-IP: 165.225.81.56
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfIlbNRvmS+oyi7uIsGZY+XCSretYg/NYy0cOPsWbnk6NWA6k8fY7JJHkd5Z6VztY9MV8vErA3B5sf+UbEddEsiZ+jvUbrr558/uYgI02R+RV2ti+s4GF
8L9cLEyp1JJj/pekXeNGd7VVAt7zMDxXtBHI8W+l355cEcRp08hYjfoAMQLDHAACjWr7XqbTN8QLG/D4cVdyZaF/3sdiTdxubL8Xdaz6f33dfNkztRiBRRkk
I1eAt5INo6uIIdzrk3KhBQ==
X-Seq: 26033
Archived-At:
X-Loop: zsh-users@zsh.org
Errors-To: zsh-users-owner@zsh.org
Precedence: list
Precedence: bulk
Sender: zsh-users-request@zsh.org
X-no-archive: yes
List-Id:
List-Help:
List-Subscribe:
List-Unsubscribe:
List-Post:
List-Owner:
List-Archive:
Archived-At:
> On 26 August 2020 at 09:59 Ahmad Ismail wrote:
> The [documentation][1] says
>
> > zstyle ':completion:*:aliens:*' tag-order \
> > 'frooble:-funny:funny\ frooble' frooble
> >which is used when you're completing for the command aliens, which
> presumably has completions tagged as `frooble' ...
>
> I understand that both context and tag can be viewed using ^Xh.
> So, I tried the following command but suggestion did not show the tags.
>
> % zstyle ':completion:*:aliens:*' tag-order 'frooble:-funny:funny\
> frooble' frooble
> % aliens TAB
> Completing file
> Desktop/ Documents/ dotfiles/ Downloads/
> % aliens ^Xh
> tags in context :completion::complete:aliens::
> globbed-files (_files _default)
> % aliens frooble ^Xh
> tags in context :completion::complete:aliens::
> globbed-files (_files _default)
>
> I think I am doing something wrong with
>
> > completions tagged as `frooble'
>
> Please help me understand how to use tags in zsh completion system.
Hi Ahmad,
That section in the guide is actually just an example of how things work
using an invented command --- your understanding is basically correct but
actually there is no "aliens" command.
Just off the top of my head (other people may have their own favourite
examples), one interesting command with a number of different tags
that apply at the start of completion is scp: ^xh for that gives me
tags in context :completion::complete:scp::
argument-rest options (_arguments _ssh _ssh)
tags in context :completion::complete:scp:argument-rest:
files hosts users (_ssh _ssh)
globbed-files (_files _ssh _ssh)
hosts (_hosts _combination _ssh_hosts _ssh _ssh)
users (_users _combination _ssh_users _ssh _ssh)
so that might be something to play with.
(Alternatively, if I got my act together I could probably write
a fake completion for "aliens" that actually did what the guide
says...)
Cheers
pws