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

Using _describe for completions.



Hello fellow users, fist time poster. I apologize if this is not the right place. 

On zsh 5.2 I am trying to write a completion function using the _describe builtin.

__foo_complete_func() {
  list=(foo:'description for foo’ bar:'description for bar')
  _describe '’ list && _ret=0
}

compdef __foo_complete_func foo

When autocompleting just “foo ” I get the expected:

bar  -- description for bar
foo  -- description for foo

However when tab completing "foo b" I get no matches shown. I don’t understand why this is. I would expect to get the completion "foo bar”

Any ideas?

Thanks in advance,
Nic


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