Command line completions using Go and Cobra

34 · Carlos Alexandro Becker · Aug. 22, 2022, 6:47 p.m.
Everyone likes command line completions, so much that some even install extra tools just to have them. But you don’t need to install anything just for completions: Bash, Fish and ZSH all support it out of the box! In this post I’ll show you how to ship completions for your Go tools using Cobra and GoReleaser. Cobra Cobra is a tool that helps you write command line applications. It is used by a lot of big Go projects, such as Kubernetes, Hugo and many others....