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

FYI: Cobra Library for CLI Interfaces



FYI,

I came across Cobra Go library which is used by some rather high profile
projects, for example Docker/Moby, etcd, Kubernetes, and OpenShift (oc),
it allows to generate bash completions for these tools:

https://github.com/spf13/cobra
https://github.com/spf13/cobra/blob/master/bash_completions.md
https://github.com/spf13/cobra/blob/master/bash_completions.go

It kind of supports zsh as well (see [1] for an example of oc(1)
completions) but in a manner limited to bash features so not taking
advantage of zsh compsys in any way. Not sure if anyone here knows more
about Cobra or even would have a chance to contribute to it to enhance
its zsh completion support.

1) https://github.com/openshift/origin/tree/master/contrib/completions/zsh

Cheers,

-- 
Marko Myllynen



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