summaryrefslogtreecommitdiff
path: root/theMagicOfAutocomplete.go
diff options
context:
space:
mode:
Diffstat (limited to 'theMagicOfAutocomplete.go')
-rw-r--r--theMagicOfAutocomplete.go10
1 files changed, 8 insertions, 2 deletions
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)