zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: _arguments: normal arg spec with empty action
Date: Fri, 21 Oct 2016 20:12:51 +0900	[thread overview]
Message-ID: <BFFE7571-4055-4960-935D-753B1E9208DE@kba.biglobe.ne.jp> (raw)
In-Reply-To: <14826.1477031511@hydra.kiddle.eu>


On 2016/10/21, at 15:31, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> 
> I can't reproduce this so perhaps there's something setup related.
> Does pressing tab a third time work?

For me it happens even with 'zsh -f':

$ zsh -f
% autoload -Uz compinit
% compinit
% awk -<TAB>

The first <TAB> lists the options, but hitting <TAB> again (or
again and again ...) does not complete options.

>> The following patch fixes the problem, but is this the best way to go?
>> +    '1: : _message "program text"' \
> 
> Does _guard work? For a heading without matches, _message -e should be
> used but that roughly what _arguments is doing.

Thanks, the following seems to work:

	'1: : _guard "^-*" "program text"'

and I think this is better, because with the style

% zstyle ':completion:*:descriptions' format '%d'

and if _message is used, then

% awk -<TAB>

will print both "program text" and "options", but only
"options" is printed if _guard is used.


Jun


  reply	other threads:[~2016-10-21 11:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 13:35 Jun T.
2016-10-21  6:31 ` Oliver Kiddle
2016-10-21 11:12   ` Jun T. [this message]
2016-11-03 23:53 ` Oliver Kiddle
2016-11-15  0:31   ` 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=BFFE7571-4055-4960-935D-753B1E9208DE@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).