github.com/s0rg/compflag (go): Package compflag generates bash completions on-the-fly from stdlib flag values.  Usage - just call compflag.Complete() somewhere before actual app logic, best point is right at the start:  Please note, that you need to exit app if any completion happened.  Build your app, put binary somewhere in your "PATH", then run:  Now enter "%your-binary-name%", and hit tab twice )
Keywords: autocompletion|bash-completion|golang-library|shell|zsh-completion