From 0c84559372b1d4c293ac10aa2b6de6e53ebb1163 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Oct 2025 02:11:40 -0500 Subject: more housecleaning --- auto.Complete.go | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'auto.Complete.go') 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 -- cgit v1.2.3