diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 05:45:29 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 05:45:29 -0500 |
| commit | c0d131a659a999661a3357209f2ccdeeed47f133 (patch) | |
| tree | faf79a9f8dd5d31a676d4ab626fb40733d61df21 /argv.go | |
| parent | e5c43347ea72b6dfa6738296506c5e22ae7aaad5 (diff) | |
new GUI codebasev0.23.106
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -1,5 +1,11 @@ package main +import ( + "fmt" + "os" + "os/user" +) + /* this parses the command line arguements @@ -41,3 +47,39 @@ the repositories in the go.sum file using git clone` func (args) Version() string { return "guireleaser " + VERSION } + +/* + handles shell autocomplete +*/ + +func (a args) DoAutoComplete(argv []string) { + switch argv[0] { + case "checkout": + usr, _ := user.Current() + fmt.Println("user devel master " + usr.Username) + case "commit": + fmt.Println("--all") + case "config": + fmt.Println("add fix list delete") + case "list": + fmt.Println("--all --mine --favorites --private") + case "pull": + fmt.Println("--all --mine --favorites --private") + case "patch": + fmt.Println("--list --submit --show") + case "dirty": + fmt.Println("--show-files") + case "user": + fmt.Println("--force") + case "devel": + fmt.Println("--force") + case "master": + fmt.Println("--force") + default: + if argv[0] == ARGNAME { + // list the subcommands here + fmt.Println("--bash quick") + } + } + os.Exit(0) +} |
