summaryrefslogtreecommitdiff
path: root/auto.Complete.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-12 02:11:40 -0500
committerJeff Carr <[email protected]>2025-10-12 02:11:40 -0500
commit0c84559372b1d4c293ac10aa2b6de6e53ebb1163 (patch)
tree14c92db2cbe6544c0c6b742e006d4736fe8da1d7 /auto.Complete.go
parentbf9f85a721d6045e631df9abe91f02d9723fcd19 (diff)
more housecleaning
Diffstat (limited to 'auto.Complete.go')
-rw-r--r--auto.Complete.go21
1 files changed, 13 insertions, 8 deletions
diff --git a/auto.Complete.go b/auto.Complete.go
index f53d282..19ccc30 100644
--- a/auto.Complete.go
+++ b/auto.Complete.go
@@ -11,17 +11,22 @@ import (
"go.wit.com/log"
)
-// this is the user's application sending us strings we need to send to bash
-func (pb *Auto) SendStrings(sendthis []string) {
- pb.Autocomplete2(strings.Join(sendthis, " "))
-}
-
-// todo: move everything to this?
+// deprecate
func (pb *Auto) Autocomplete3(sendthis []string) {
- pb.Autocomplete2(strings.Join(sendthis, " "))
+ pb.SendStrings(sendthis)
}
+// deprecate
func (pb *Auto) Autocomplete2(sendthis string) {
+ pb.SendStrings(strings.Split(sendthis, " "))
+}
+
+func (pb *Auto) SendString(sendthis string) {
+ pb.SendStrings(strings.Split(sendthis, " "))
+}
+
+// this is the user's application sending us strings we need to send to bash
+func (pb *Auto) SendStrings(parts []string) {
dur := pb.Duration.AsDuration()
if dur < time.Millisecond*200 {
pb.Debug = true
@@ -42,7 +47,7 @@ func (pb *Auto) Autocomplete2(sendthis string) {
}
}
- parts := strings.Split(sendthis, " ")
+ // parts := strings.Split(sendthis, " ")
var all []string
for _, part := range parts {
var found bool