diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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) } |
