1

I'm working on a completion for a shell program I have and I'd like to be able to provide metadata descriptions for the completion

For example

complete-this f<tab>

foo - "some description"
baz - "some other description"

And if "foo" is chosen, then the result of the completion will choose "foo"

Not sure how to do this or what functions to even go look at? Does anyone have any suggestions?

devshorts
  • 8,572
  • 4
  • 50
  • 73
  • 1
    `man zshcompsys` or [online doc](http://zsh.sourceforge.net/Doc/Release/Completion-System.html). The very basic functions you want to look at are `_describe` and `_arguments`. If you feel overwhelmed, probably zsh-users' [`zsh-completion-howto`](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org) is a more approachable starting point. Also, looking at real world examples always help, which are also abundant in [zsh-users/zsh-completion](https://github.com/zsh-users/zsh-completions). – 4ae1e1 Jun 10 '15 at 20:51

0 Answers0