Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[BUG] Issue with _arguments !-x !+x



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



Messages sorted by: Reverse Date, Date, Thread, Author