rm old code

This commit is contained in:
Jeff Carr 2025-09-09 03:16:20 -05:00
parent a991a4c187
commit f6bad20818
1 changed files with 15 additions and 70 deletions

85
argv.go
View File

@ -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)
}