diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 03:16:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 03:16:20 -0500 |
| commit | f6bad208189a2f249352c2d1372e178b5ac422de (patch) | |
| tree | b35f2ee279969750bea5b35f56f2d2abca5c7b7e | |
| parent | a991a4c187ca0462f713d6b474a9bb8400ac3820 (diff) | |
rm old codev0.25.0
| -rw-r--r-- | argv.go | 85 |
1 files changed, 15 insertions, 70 deletions
@@ -146,74 +146,9 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI. ` } -/* -func (args) doBashHelpDebug() { - fmt.Fprintln(os.Stderr, "") - fmt.Fprintln(os.Stderr, "hello world") - var more string - p0 := "0" + argv.BashAuto[0] - p1 := "1" + argv.BashAuto[1] - p2 := "2" + argv.BashAuto[2] - if len(argv.BashAuto[1]) >= 0 { - more = "more" - } else { - more = "less" - } - p1a := fmt.Sprintf("1a.%s.%+v.\n", argv.BashAuto[1], len(argv.BashAuto[1])) - fmt.Fprintln(os.Stderr, "pull something else", argv.BashAuto, len(argv.BashAuto), p0, p1, p2, p1a, "end", more) - fmt.Fprintln(os.Stderr, "") -} -*/ - -/* - handles shell autocomplete -*/ - -// used for shell auto completion -// var ARGNAME string = "forge" // todo: get this from $0 ? - -func deleteMatch() { - // f := forgedb.InitSimple() - fmt.Println("go.wit.com/lib/gui/repostatus todo: need to do this") -} - -func ifBlank(arg string) bool { - if arg == "''" { - // if empty, the user has not typed something - return true - } - return false -} - -/* -// prints help to STDERR // TODO: move everything below this to go-args -func (args) doBashHelp() { - if argv.BashAuto[1] != "''" { - // if this is not blank, then the user has typed something - return - } - if argv.BashAuto[0] != ARGNAME { - // if this is not the name of the command, the user already started doing something - return - } - if argv.BashAuto[0] == ARGNAME { - me.pp.WriteHelp(os.Stderr) - return - } - fmt.Fprintln(os.Stderr, "") - fmt.Fprintln(os.Stderr, "hello world") - fmt.Fprintln(os.Stderr, "") -} - -func (a args) doBashAuto() { - DoAutoComplete(argv.BashAuto) - os.Exit(0) -} -*/ - -func (a args) DoAutoComplete(argv []string) { - DoAutoComplete(argv) -} +// +// handles shell autocomplete +// func DoAutoComplete(argv []string) { // fmt.Fprintln(os.Stderr, "") // these are for debugging @@ -231,8 +166,6 @@ func DoAutoComplete(argv []string) { fmt.Println("--all") case "config": fmt.Println("add fix list debug") - case "delete": - deleteMatch() case "dirty": fmt.Println("") case "gui": @@ -269,3 +202,15 @@ func DoAutoComplete(argv []string) { } os.Exit(0) } + +func ifBlank(arg string) bool { + if arg == "''" { + // if empty, the user has not typed something + return true + } + return false +} + +func (a args) DoAutoComplete(argv []string) { + DoAutoComplete(argv) +} |
