diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1,6 +1,11 @@ package main -import "go.wit.com/log" +import ( + "fmt" + "os" + + "go.wit.com/log" +) /* this parses the command line arguements @@ -74,3 +79,28 @@ func init() { WARN = log.NewFlag("WARN", true, full, short, "bad things") EVENT = log.NewFlag("EVENT", true, full, short, "hypeprvisor/droplet events") } + +/* + handles shell autocomplete +*/ + +func (a args) DoAutoComplete(argv []string) { + switch argv[0] { + case "list": + fmt.Println("droplets hypervisors") + case "droplet": + fmt.Println("start stop") + case "devel": + fmt.Println("--force") + case "master": + fmt.Println("") + case "verify": + fmt.Println("user devel master") + default: + if argv[0] == ARGNAME { + // list the subcommands here + fmt.Println("--bash list droplet") + } + } + os.Exit(0) +} |
