complete/gocomplete/complete.go

36 lines
544 B
Go
Raw Normal View History

2017-05-05 10:01:27 -05:00
package main
import (
"github.com/posener/complete"
)
var (
build = complete.Command{
Flags: complete.Flags{
"-o": complete.FlagUnknownFollow,
"-i": complete.FlagNoFollow,
2017-05-05 10:01:27 -05:00
},
}
test = complete.Command{
Flags: complete.Flags{
"-run": complete.FlagUnknownFollow,
"-count": complete.FlagUnknownFollow,
},
}
gogo = complete.Command{
Sub: complete.Commands{
"build": build,
"test": test,
2017-05-05 10:01:27 -05:00
},
Flags: complete.Flags{
"-h": complete.FlagNoFollow,
},
}
)
2017-05-05 10:01:27 -05:00
func main() {
complete.New(gogo).Complete()
2017-05-05 10:01:27 -05:00
}