zsh-workers
 help / color / Atom feed
From: dana <dana@dana.is>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [BUG] Issue with _arguments !-x !+x
Date: Wed, 12 Feb 2020 16:57:33 -0600
Message-ID: <BED65A01-95AA-473E-BCF8-3E5E19A66C7E@dana.is> (raw)

I noticed something unexpected when i have both !-x and !+x type option specs
and then i try to complete stacked options containing the -x ones:

  # Only !-x
  % _foo() { _arguments -s -S : -{a,b,c} \!-{d,e,f} }
  % compdef _foo foo
  % foo -ad<TAB>
  completing option:
  -b  -c
  % foo -da<TAB>
  completing option:
  -b  -c
  % foo -def<TAB>
  completing option:
  -a  -b  -c

  # Both !-x and !+x
  % _foo() { _arguments -s -S : -{a,b,c} \!-{d,e,f} \!+{d,e,f} }
  % compdef _foo foo
  % foo -ad<TAB>
  completing no arguments:
  % foo -da<TAB>
  completing option:
  -b  -c
  % foo -def<TAB>
  completing no arguments:

All i can figure out so far is that comparguments doesn't think there's
anything to complete. But i'm not sure why. Something to do with how ca_doff
is calculated, i think?

dana


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=BED65A01-95AA-473E-BCF8-3E5E19A66C7E@dana.is \
    --to=dana@dana.is \
    --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

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git