zsh-workers
 help / color / mirror / code / Atom feed
From: ryan@splintermail.com
To: zsh-workers@zsh.org
Subject: Bug related to order of zsh completion options?
Date: Thu, 14 Sep 2017 07:46:10 -0500	[thread overview]
Message-ID: <20170914124610.MBDRLsMZSBrKvJ-mpfzfvQuIMcCch9uxkeWvj0N8yJo@z> (raw)

Hi zsh-workers,

I found the solution for something which has been plaguing me for about
half a day, and I think it is a bug.

I can sum it up in this file:

----------- file "_brokencompletion" begins ------------

#compdef brokencompletion

# first two versions work
#_arguments '1:a:(( a_b_c\:"aabbcc" a_z\:"aaazzz" ))'
#_arguments '1:a:( a_z a_b_c )'

# this version doesn't
#_arguments '1:a:(( a_z\:"aaazzz" a_b_c\:"aabbcc" ))'

----------- file "_brokencompletion" ends ------------


All of my tests can be repeated with a clean zsh shell:

% zsh -f
  (new shell starts)
% autoload compinit
% fpath=(~/path/containing/_brokencompletion/ $fpath)
% compinit


When I use the one of the first two versions of _arguments in the file
above, I see exactly the completion that I expect to see.

When I use the third version of _arguments, I see the following:

    I type: brokencompletion <tab>
    I get:  brokencompletion a_
                             ^ but my cursor is on the "a"

If I change the order of possible matches in the parenthesis, it fixes
the problem (first version of _arguments line).  Also if I use the
version which does not have descriptions for each command, I get normal
behavior.

Is this a bug or is this documented somewhere, and I just missed a
specification?

Thanks,

Ryan


             reply	other threads:[~2017-09-14 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 12:46 ryan [this message]
     [not found] <E1dsTih-0000Vx-Fj@kiddle.eu>
2017-09-14 15:12 ` 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=20170914124610.MBDRLsMZSBrKvJ-mpfzfvQuIMcCch9uxkeWvj0N8yJo@z \
    --to=ryan@splintermail.com \
    --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).