zsh-users
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@comfychair.org>
To: zsh-users@zsh.org
Subject: completion oddity
Date: Mon, 21 May 2012 14:40:23 -0700	[thread overview]
Message-ID: <20120521214023.GB10763@lorien.comfychair.org> (raw)

If I have a completion function like this:

    _k () { _arguments --r1-word --r2-word }

and I press TAB at the end of the following commandline:

    % k --r

then I get

    % k --r-word

Another tab beeps and lists the choices, a third tab beeps and chooses
--r1-word, and thereon tabs simply cycle between the two.  That's more or
less expected.

If I define _k instead as

    _k () { _arguments --r1-word --really-r1-word }

then the second tab simply completes --r1-word, which seems wrong to me.

This is all with "zsh -f", with nothing but

    autoload -Uz compinit
    compinit -i
    compdef _k k

run before attempting the completion.

A co-worker says he noticed this behavior change (from better to worse)
sometime around the switch in Solaris from 4.3.10 to 4.3.12, but I can
reproduce it on our builds that had 4.3.9, so I'm guessing it's been around
for a while.

Thanks,
Danek


             reply	other threads:[~2012-05-21 21:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 21:40 Danek Duvall [this message]
2012-05-22  2:42 ` Bart Schaefer
2012-05-22  5:01   ` Danek Duvall
2012-05-22  5:16     ` Danek Duvall
2012-05-22  6:35       ` Bart Schaefer
2012-05-22 16:35         ` Greg Klanderman
2012-05-22 22:30           ` Bart Schaefer
2012-05-22 22:55             ` Greg Klanderman
2012-05-22 23:06         ` Danek Duvall
2012-06-15 10:43       ` #conpdef and compadd Eric Smith
2012-06-15 11:06         ` Mikael Magnusson
2012-06-15 19:22           ` #conpdef and compadd -> command regex Eric Smith
2012-06-15 22:22             ` Mikael Magnusson
2012-05-22 16:18   ` completion oddity Greg Klanderman
2012-05-22 22:57     ` Bart Schaefer
2012-05-22 23:09       ` Greg Klanderman
2012-05-23  6:08         ` Bart Schaefer
2012-05-23  1:03       ` Danek Duvall
2012-05-23  6:31         ` Bart Schaefer
2012-05-26 21:19           ` Danek Duvall
2012-05-23  6:25     ` Bart Schaefer
2012-05-23 18:48       ` Greg Klanderman
2012-05-24  3:39         ` Bart Schaefer

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=20120521214023.GB10763@lorien.comfychair.org \
    --to=duvall@comfychair.org \
    --cc=zsh-users@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).