summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/structs.go b/structs.go
index bdc43fc..9d47309 100644
--- a/structs.go
+++ b/structs.go
@@ -3,12 +3,9 @@ package prep
// initializes logging and command line options
import (
- "fmt"
- "os"
"strings"
"go.wit.com/dev/alexflint/arg"
- "go.wit.com/lib/cobol"
)
/*
@@ -37,32 +34,6 @@ type AutoArgs struct {
autoFunc func(*Auto) // also a function for autocomplete
}
-// print out auto complete debugging info
-func (pb *Auto) PrintDebug() {
- dur := pb.Duration.AsDuration()
- pb.Debugf("AUTOCOMPLETE: arg0='%s' arg1='%s' partial='%s' cmd='%s' age=%s argv=%v\n", pb.Arg0, pb.Arg1, pb.Partial, pb.Cmd, cobol.FormatDuration(dur), pb.Argv)
-}
-
-func (pb *Auto) WriteHelp() {
- myAuto.pp.WriteHelp(os.Stdout)
-}
-
-func (pb *Auto) Debugf(fmts string, parts ...any) {
- fmts = strings.TrimSpace(fmts)
- fmts += "\n"
- // NOTE: env doesn't work probably most (all?) the time because bash
- // doesn't send all the ENV to autocomplete. so, trap on a "--autodebug" command line arg
- if os.Getenv("AUTOCOMPLETE_VERBOSE") == "true" || pb.Debug {
- if !pb.Newline {
- fmt.Fprintf(os.Stderr, "\n")
- pb.Newline = true
- }
- fmt.Fprintf(os.Stderr, fmts, parts...)
- } else {
- // fmt.Fprintf(os.Stderr, "NOT DOING ANYTHING\n")
- }
-}
-
// returns the last command (is blank if the current arg is not blank)
func GetLast(cur string, argv []string) string {
if cur != "''" {