mitchellh / cli

A Go library for implementing command-line interfaces.
Mozilla Public License 2.0
1.73k stars 123 forks source link

How to write shell completion function in Go #84

Open blueray453 opened 4 years ago

blueray453 commented 4 years ago

For example the following is a zsh completion function for command foo:

#compdef _foo foo
compadd first second third fourth

So, if we type foo <tab> in the zsh terminal, it suggests first second third fourth.

How can I do this using cli?