complete/gocomplete/complete.go

29 lines
546 B
Go
Raw Normal View History

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