From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh <zsh-workers@sunsite.dk>
Cc: 258431@bugs.debian.org
Subject: default tag-order (was Re: zsh 4.2.1-test-A)
Date: Sun, 08 Aug 2004 16:40:20 +0200 [thread overview]
Message-ID: <16609.1091976020@trentino.logica.co.uk> (raw)
In-Reply-To: <20040808044557.GA8117@scowler.net>
Clint Adams wrote:
> I just double-checked to make sure I had really tested this with
> 4.2.1-test-A, and I still can't complete any files at all; only options
> are offered.
>
> This happens with zsh -f followed by compinit.
One of my styles made a difference. I can reproduce it with zsh -f.
The problem is with the default tag-order defined in _tags. The relevant
bit of code is as follows:
zstyle -a ":completion:${curcontext}:" tag-order order ||
order=('(|*-)argument-* (|*-)option[-+]* values' options)
There are a few different things we could do here. I can't work out why
"values" needs to be in there. Does _arguments ever add stuff with a
values tag or does _values ever add stuff with an options tag? Can we
remove the values tag from there without breaking anything? It has been
there since the very first version of _tags.
One safe option is to insert `(( ! ${@[(I)options]} )) ||'.
That checks if there is an options tag before applying the tag-order.
Any other thoughts?
Default tag-orders really need thinking about in general. It'd be nice
to be able to specify them from completion functions themself. This code
above should really be in _arguments. That would need care, though. It
is often the case that tag-orders are better not applied for _approximate
or _correct for example.
Oliver
next prev parent reply other threads:[~2004-08-08 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200408061350.i76DovBi028948@news01.csr.com>
2004-08-06 18:03 ` zsh 4.2.1-test-A Clint Adams
2004-08-07 13:40 ` Oliver Kiddle
2004-08-08 4:45 ` Clint Adams
2004-08-08 14:40 ` Oliver Kiddle [this message]
2004-08-08 16:03 ` default tag-order (was Re: zsh 4.2.1-test-A) Bart Schaefer
2004-08-08 16:46 ` Bart Schaefer
2004-08-08 17:25 ` Oliver Kiddle
2004-08-08 17:54 ` Oliver Kiddle
2004-08-10 18:16 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16609.1091976020@trentino.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=258431@bugs.debian.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).