summaryrefslogtreecommitdiff
path: root/argv.Print.go
diff options
context:
space:
mode:
Diffstat (limited to 'argv.Print.go')
-rw-r--r--argv.Print.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/argv.Print.go b/argv.Print.go
index ed6f75e..0d029b4 100644
--- a/argv.Print.go
+++ b/argv.Print.go
@@ -19,7 +19,8 @@ func (pb *Argv) Debugf(fmts string, parts ...any) {
func Debugf(fmts string, parts ...any) {
fmts = strings.TrimSpace(fmts)
fmts += "\n"
- me.pb.Stderr += fmt.Sprintf(fmts, parts...)
+ // me.pb.Stderr += fmt.Sprintf(fmts, parts...)
+ fmt.Fprintf(Stderr, fmts, parts...)
}
// print out auto complete debugging info
@@ -59,14 +60,18 @@ func (all *Argvs) PrintHistory(last string) {
// hist := fmt.Sprintf("HIST(%d)", counter)
hist := fmt.Sprintf("HIST")
pb.PrintDebugNew(hist, last)
+ if counter > 100 {
+ // sometimes I'm dumb
+ break
+ }
}
}
-func (pb *Argv) PrintStderr() {
+func PrintStderr() {
if !me.debug {
return
}
- lines := strings.Split(strings.TrimSpace(pb.Stderr), "\n")
+ lines := strings.Split(strings.TrimSpace(PB.Stderr), "\n")
if len(lines) == 0 {
return
}
@@ -80,6 +85,6 @@ func (pb *Argv) PrintStderr() {
}
}
-func (pb *Argv) PrintStdout() {
- fmt.Fprintf(os.Stdout, "%s\n", pb.Stdout)
+func PrintStdout() {
+ fmt.Fprintf(os.Stdout, "%s\n", PB.Stdout)
}