zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: _arguments: normal arg spec with empty action
Date: Tue, 18 Oct 2016 22:35:50 +0900	[thread overview]
Message-ID: <81D02BE7-7F8E-4E46-B7A9-95A5C9D8DDF7@kba.biglobe.ne.jp> (raw)

If I type

zsh% awk -<TAB>

then it shows the list of options (-F -f -v), as expected.
But if I hit <TAB> again, it does not cycle through the options.

It seems this is caused by the empty action in the spec:
	'1:program text:'
Adding a space ('1:program text: ') does not work.

The following patch fixes the problem, but is this the best way to go?


diff --git a/Completion/Unix/Command/_awk b/Completion/Unix/Command/_awk
index c493c3b..1645048 100644
--- a/Completion/Unix/Command/_awk
+++ b/Completion/Unix/Command/_awk
@@ -17,5 +17,5 @@
 _arguments -S -s '-F+[define input field separator to be an extended regular expression]:extended regular expression:' \
     '*-v+[assign values to variables]:assignment:' \
     '(1)-f+[program file]:program file:_files' \
-    '1:program text:' \
+    '1: : _message "program text"' \
     '*:input files:_files'



             reply	other threads:[~2016-10-18 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 13:35 Jun T. [this message]
2016-10-21  6:31 ` Oliver Kiddle
2016-10-21 11:12   ` Jun T.
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=81D02BE7-7F8E-4E46-B7A9-95A5C9D8DDF7@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).