summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/argv.go b/argv.go
index 6f34737..ac5419c 100644
--- a/argv.go
+++ b/argv.go
@@ -6,6 +6,7 @@ package main
import (
"fmt"
"os"
+ "strings"
)
/*
@@ -151,7 +152,12 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI.
// handles shell autocomplete
//
-func DoAutoComplete(argv []string) {
+func DoAutoComplete(arg0 string, arg1 string, argv []string) {
+ if strings.HasPrefix(argv[0], "-") {
+ fmt.Fprintf(os.Stderr, "stuff --gui --all '%s' '%s' %v\n", arg0, arg1, argv)
+ fmt.Println("--all --gui")
+ return
+ }
switch argv[0] {
case "checkout":
fmt.Println("devel master user")
@@ -214,6 +220,6 @@ func ifBlank(arg string) bool {
return false
}
-func (a args) DoAutoComplete(argv []string) {
- DoAutoComplete(argv)
+func (a args) DoAutoComplete(arg0 string, arg1 string, argv []string) {
+ DoAutoComplete(arg0, arg1, argv)
}