summaryrefslogtreecommitdiff
path: root/theMagicOfAutocomplete.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 20:26:35 -0500
committerJeff Carr <[email protected]>2025-10-28 20:26:35 -0500
commitd01a280e32cca2809c35d02cef25cc6c691a0e1e (patch)
treeb02cc25e2ea8fb5d0383f2cf7a3ca24b65a62e71 /theMagicOfAutocomplete.go
parent69a8ae0bdc33e898bee5046bfee73692879f5297 (diff)
more dbg output cleanups
Diffstat (limited to 'theMagicOfAutocomplete.go')
-rw-r--r--theMagicOfAutocomplete.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/theMagicOfAutocomplete.go b/theMagicOfAutocomplete.go
index 79154e9..95585bd 100644
--- a/theMagicOfAutocomplete.go
+++ b/theMagicOfAutocomplete.go
@@ -116,6 +116,8 @@ func prepareStdout() {
func savePB() {
// save now. this is near the end probably
+ dur := time.Since(PB.Ctime.AsTime())
+ me.pb.ArgvDuration = durationpb.New(dur) // track how long autocomplete took
me.all.Append(me.pb)
// npb := new(Argv)
// npb.Uuid = uuid.New().String()
@@ -155,7 +157,6 @@ func saveAndExit() {
}
// sets me.last
-// computes me.pb.Duration
func examineArgvHistory() {
me.all = NewArgvs()
// loads the argv autocomplete history file
@@ -243,7 +244,7 @@ func examineArgvHistory() {
me.pb.Fast = 0
}
// user keeps hitting tab. trigger help
- if me.pb.Duration.AsDuration() < time.Millisecond*300 {
+ if dur < time.Millisecond*300 {
me.pb.Fast = me.last.Fast + 1
} else {
me.pb.Fast = 0