go install github.com/posener/complete/gocomplete
gocomplete -install
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nifty! Do the bash completion scripts need to be dynamically regenerated? I guess so for some of the features like completing on package names.
It seems useful to have some Go completions (e.g. go in<TAB> == go install) available as part of distro packages.
On Sat, May 13, 2017 at 1:29 AM, Eyal Posener <pos...@gmail.com> wrote:
Simple to install (Assuming GOPATH and PATH are correct):
go install github.com/posener/complete/gocomplete
gocomplete -installFeatures:
- Complete go command, sub commands and flags.
- Complete package names, .go files and ellipsis when necessary.
- Complete test names after -run flag!
Works with bash / zsh shellsThis is also a package, that enables writing bash completion scripts, or add them to an existing go program.Please, open issues, contribute and star!
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/ZcbRJuJJrsI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
I'll look into this. So far I've spent 30 min on this. :) which dir pattern should I use for directory completions so that the suggestions don't start with ./ ?
var name string
whatever.StringVar(&name, "name", "", "Give your name", complete.PredictAnything)
if whatever.Run() {
return
}
go get github.com/posener/complete/gocomplete
gocomplete -install