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

possible bug in _arguments



Hi,

I'm having a problem completing certain lists of words in a completion I
wrote, which appears to be a bug.

When I use this completion:

#compdef fakecmd
#_arguments ':commands:(a-b a-d-e)' # works as expected
_arguments ':commands:((a-b:foo a-d-e:baz))'
              # insert a-c:bar ^ here and it works as expected

typing "fakecmd a[tab]" completes "a-", but it leaves the cursor on the
hyphen instead of after it. If I use the first form instead, it puts the
cursor after the hyphen, as I would expect. It also works as expected if
I insert another word with a single hyphen, as indicated. I came across
this while writing a completion for tla [1], which has the commands
my-id, my-default-archive, and my-revision-library. Like my example,
typing "tla my[tab]" leaves the cursor on the first hyphen.

Any thoughts on this?

Thanks,

Jason McCarty

[1] http://savannah.gnu.org/projects/gnu-arch



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