summaryrefslogtreecommitdiff
path: root/gocomplete/complete.go
blob: f680c2a05c5774509ae6702d0f0664760ba5864d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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()
}