From cc600fe686e905a696cbc840decdd8d24b7bb72f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Oct 2025 06:17:32 -0500 Subject: more cleaning --- theMagicOfAutocomplete.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'theMagicOfAutocomplete.go') diff --git a/theMagicOfAutocomplete.go b/theMagicOfAutocomplete.go index d28dd8b..3202af3 100644 --- a/theMagicOfAutocomplete.go +++ b/theMagicOfAutocomplete.go @@ -31,7 +31,14 @@ func Autocomplete(dest any) *Auto { pb.PrintDebug() } - pb.getHistoryPB() // read in the history protobuf file + all, err := pb.getHistoryPB() // read in the history protobuf file + if err != nil { + // there is no history + } + + if pb.Debug { + all.PrintHistory() + } // turn on debugging if duration < 200 milliseconds dur := pb.Duration.AsDuration() @@ -50,7 +57,6 @@ func Autocomplete(dest any) *Auto { } // pb.Debug = true // pb.Debugf("DEBUG: MustParse(%v)", flags) - var err error myAuto.pp, err = arg.ParseFlags(flags, dest) if err != nil { pb.Debugf("DEBUG: Parse error: %v", err) -- cgit v1.2.3